From 5f6a1140651d49df2eb92530d80b544ed32636e4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 24 Feb 2025 22:44:59 +0000 Subject: [PATCH] CodeGen from PR 32524 in Azure/azure-rest-api-specs Merge 3c329808dafe1258caf4ffa13ad868d3f587dfd0 into 7f368fe6ce535a31db2657aafc692682dce8cef8 --- sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln | 56 + sdk/ai/Azure.AI.Agents/CHANGELOG.md | 11 + sdk/ai/Azure.AI.Agents/Directory.Build.props | 6 + sdk/ai/Azure.AI.Agents/README.md | 107 ++ .../src/Azure.AI.Agents.csproj | 19 + .../AIAgentsClientBuilderExtensions.cs | 38 + .../src/Generated/AIAgentsModelFactory.cs | 1053 +++++++++++++++++ .../src/Generated/Agent.Serialization.cs | 8 +- .../src/Generated/Agent.cs | 6 +- .../src/Generated/AgentObject.cs | 48 + .../src/Generated/AgentStreamEvent.cs | 2 +- .../Generated/AgentThread.Serialization.cs | 8 +- .../src/Generated/AgentThread.cs | 6 +- ...gentThreadCreationOptions.Serialization.cs | 2 +- .../Generated/AgentThreadCreationOptions.cs | 2 +- .../src/Generated/AgentThreadObject.cs | 48 + .../AgentsApiResponseFormat.Serialization.cs | 2 +- .../src/Generated/AgentsApiResponseFormat.cs | 2 +- .../Generated/AgentsApiResponseFormatMode.cs | 2 +- .../AgentsApiToolChoiceOptionMode.cs | 2 +- .../src/Generated/AgentsClient.cs | 475 +++++--- .../src/Generated/AgentsClientOptions.cs | 37 + .../AgentsNamedToolChoice.Serialization.cs | 2 +- .../src/Generated/AgentsNamedToolChoice.cs | 2 +- .../Generated/AgentsNamedToolChoiceType.cs | 2 +- .../AzureAISearchResource.Serialization.cs | 2 +- .../src/Generated/AzureAISearchResource.cs | 2 +- ...ureAISearchToolDefinition.Serialization.cs | 2 +- .../Generated/AzureAISearchToolDefinition.cs | 2 +- .../AzureFunctionBinding.Serialization.cs | 2 +- .../src/Generated/AzureFunctionBinding.cs | 2 +- .../src/Generated/AzureFunctionBindingType.cs | 2 +- ...AzureFunctionStorageQueue.Serialization.cs | 2 +- .../Generated/AzureFunctionStorageQueue.cs | 2 +- ...ureFunctionToolDefinition.Serialization.cs | 4 +- .../Generated/AzureFunctionToolDefinition.cs | 16 +- ...ngGroundingToolDefinition.Serialization.cs | 2 +- .../Generated/BingGroundingToolDefinition.cs | 2 +- ...InterpreterToolDefinition.Serialization.cs | 2 +- .../CodeInterpreterToolDefinition.cs | 2 +- ...deInterpreterToolResource.Serialization.cs | 2 +- .../Generated/CodeInterpreterToolResource.cs | 2 +- .../CreateAgentRequest.Serialization.cs | 2 +- .../src/Generated/CreateAgentRequest.cs | 2 +- .../CreateMessageRequest.Serialization.cs | 2 +- .../src/Generated/CreateMessageRequest.cs | 2 +- .../CreateRunRequest.Serialization.cs | 4 +- .../src/Generated/CreateRunRequest.cs | 20 +- ...CreateThreadAndRunRequest.Serialization.cs | 4 +- .../Generated/CreateThreadAndRunRequest.cs | 20 +- .../CreateThreadRequest.Serialization.cs | 2 +- .../src/Generated/CreateThreadRequest.cs | 2 +- ...ctorStoreFileBatchRequest.Serialization.cs | 2 +- .../CreateVectorStoreFileBatchRequest.cs | 2 +- ...ateVectorStoreFileRequest.Serialization.cs | 2 +- .../Generated/CreateVectorStoreFileRequest.cs | 2 +- .../CreateVectorStoreRequest.Serialization.cs | 2 +- .../src/Generated/CreateVectorStoreRequest.cs | 2 +- .../src/Generated/DoneEvent.cs | 2 +- .../src/Generated/ErrorEvent.cs | 2 +- .../FileSearchRankingOptions.Serialization.cs | 2 +- .../src/Generated/FileSearchRankingOptions.cs | 2 +- ...FileSearchToolCallContent.Serialization.cs | 2 +- .../Generated/FileSearchToolCallContent.cs | 2 +- .../FileSearchToolCallContentType.cs | 2 +- .../FileSearchToolDefinition.Serialization.cs | 2 +- .../src/Generated/FileSearchToolDefinition.cs | 2 +- ...archToolDefinitionDetails.Serialization.cs | 2 +- .../FileSearchToolDefinitionDetails.cs | 2 +- .../FileSearchToolResource.Serialization.cs | 2 +- .../src/Generated/FileSearchToolResource.cs | 2 +- .../src/Generated/FileState.cs | 2 +- .../Generated/FunctionName.Serialization.cs | 2 +- .../src/Generated/FunctionName.cs | 2 +- .../FunctionToolDefinition.Serialization.cs | 4 +- .../src/Generated/FunctionToolDefinition.cs | 16 +- .../src/Generated/IncompleteDetailsReason.cs | 2 +- .../IncompleteRunDetails.Serialization.cs | 2 +- .../src/Generated/IncompleteRunDetails.cs | 2 +- .../Generated/IndexResource.Serialization.cs | 2 +- .../src/Generated/IndexResource.cs | 2 +- .../src/Generated/Internal/Argument.cs | 129 ++ .../Internal/ChangeTrackingDictionary.cs | 167 +++ .../Generated/Internal/ChangeTrackingList.cs | 153 +++ .../Internal/ModelSerializationExtensions.cs | 398 +++++++ .../MultipartFormDataRequestContent.cs | 203 ++++ .../src/Generated/Internal/Optional.cs | 51 + .../Internal/Utf8JsonRequestContent.cs | 55 + ...ternalAgentDeletionStatus.Serialization.cs | 2 +- .../Generated/InternalAgentDeletionStatus.cs | 2 +- .../InternalAgentDeletionStatusObject.cs | 2 +- ...alAzureFunctionDefinition.Serialization.cs | 2 +- .../InternalAzureFunctionDefinition.cs | 2 +- ...nterpreterToolCallDetails.Serialization.cs | 2 +- .../InternalCodeInterpreterToolCallDetails.cs | 2 +- ...nternalFileDeletionStatus.Serialization.cs | 2 +- .../Generated/InternalFileDeletionStatus.cs | 2 +- .../InternalFileDeletionStatusObject.cs | 2 +- .../InternalFileListResponse.Serialization.cs | 8 +- .../src/Generated/InternalFileListResponse.cs | 8 +- .../InternalFileListResponseObject.cs | 2 +- ...nternalFunctionDefinition.Serialization.cs | 2 +- .../Generated/InternalFunctionDefinition.cs | 2 +- ...alMessageImageFileDetails.Serialization.cs | 2 +- .../InternalMessageImageFileDetails.cs | 2 +- ...nternalMessageTextDetails.Serialization.cs | 2 +- .../Generated/InternalMessageTextDetails.cs | 8 +- ...geTextFileCitationDetails.Serialization.cs | 2 +- .../InternalMessageTextFileCitationDetails.cs | 2 +- ...essageTextFilePathDetails.Serialization.cs | 2 +- .../InternalMessageTextFilePathDetails.cs | 2 +- ...edFunctionToolCallDetails.Serialization.cs | 2 +- ...InternalRequiredFunctionToolCallDetails.cs | 2 +- ...epFunctionToolCallDetails.Serialization.cs | 2 +- .../InternalRunStepFunctionToolCallDetails.cs | 2 +- ...lSubmitToolOutputsDetails.Serialization.cs | 2 +- .../InternalSubmitToolOutputsDetails.cs | 2 +- .../src/Generated/ListSortOrder.cs | 2 +- .../MessageAttachment.Serialization.cs | 2 +- .../src/Generated/MessageAttachment.cs | 2 +- .../Generated/MessageContent.Serialization.cs | 2 +- .../src/Generated/MessageContent.cs | 2 +- .../Generated/MessageDelta.Serialization.cs | 2 +- .../src/Generated/MessageDelta.cs | 2 +- .../MessageDeltaChunk.Serialization.cs | 2 +- .../src/Generated/MessageDeltaChunk.cs | 2 +- .../src/Generated/MessageDeltaChunkObject.cs | 2 +- .../MessageDeltaContent.Serialization.cs | 2 +- .../src/Generated/MessageDeltaContent.cs | 2 +- ...sageDeltaImageFileContent.Serialization.cs | 2 +- .../Generated/MessageDeltaImageFileContent.cs | 2 +- ...ltaImageFileContentObject.Serialization.cs | 2 +- .../MessageDeltaImageFileContentObject.cs | 2 +- ...essageDeltaTextAnnotation.Serialization.cs | 3 +- .../Generated/MessageDeltaTextAnnotation.cs | 4 +- .../MessageDeltaTextContent.Serialization.cs | 2 +- .../src/Generated/MessageDeltaTextContent.cs | 2 +- ...ageDeltaTextContentObject.Serialization.cs | 2 +- .../MessageDeltaTextContentObject.cs | 6 +- ...extFileCitationAnnotation.Serialization.cs | 2 +- .../MessageDeltaTextFileCitationAnnotation.cs | 2 +- ...eCitationAnnotationObject.Serialization.cs | 2 +- ...geDeltaTextFileCitationAnnotationObject.cs | 2 +- ...ltaTextFilePathAnnotation.Serialization.cs | 2 +- .../MessageDeltaTextFilePathAnnotation.cs | 2 +- ...tFilePathAnnotationObject.Serialization.cs | 2 +- ...essageDeltaTextFilePathAnnotationObject.cs | 2 +- ...TextUrlCitationAnnotation.Serialization.cs | 176 +++ .../MessageDeltaTextUrlCitationAnnotation.cs | 54 + ...ltaTextUrlCitationDetails.Serialization.cs | 153 +++ .../MessageDeltaTextUrlCitationDetails.cs | 79 ++ .../MessageImageFileContent.Serialization.cs | 4 +- .../src/Generated/MessageImageFileContent.cs | 16 +- .../MessageIncompleteDetails.Serialization.cs | 2 +- .../src/Generated/MessageIncompleteDetails.cs | 2 +- .../MessageIncompleteDetailsReason.cs | 2 +- .../src/Generated/MessageRole.cs | 2 +- .../src/Generated/MessageStatus.cs | 2 +- .../src/Generated/MessageStreamEvent.cs | 2 +- .../MessageTextAnnotation.Serialization.cs | 3 +- .../src/Generated/MessageTextAnnotation.cs | 4 +- .../MessageTextContent.Serialization.cs | 4 +- .../src/Generated/MessageTextContent.cs | 16 +- ...extFileCitationAnnotation.Serialization.cs | 4 +- .../MessageTextFileCitationAnnotation.cs | 24 +- ...ageTextFilePathAnnotation.Serialization.cs | 4 +- .../MessageTextFilePathAnnotation.cs | 18 +- ...TextUrlCitationAnnotation.Serialization.cs | 176 +++ .../MessageTextUrlCitationAnnotation.cs | 55 + ...ageTextUrlCitationDetails.Serialization.cs | 153 +++ .../MessageTextUrlCitationDetails.cs | 79 ++ ...osoftFabricToolDefinition.Serialization.cs | 2 +- .../MicrosoftFabricToolDefinition.cs | 2 +- .../ModifyVectorStoreRequest.Serialization.cs | 2 +- .../src/Generated/ModifyVectorStoreRequest.cs | 2 +- .../Generated/OpenAIFile.Serialization.cs} | 56 +- .../src/Generated/OpenAIFile.cs} | 21 +- .../src/Generated/OpenAIFileObject.cs | 48 + .../src/Generated/OpenAIFilePurpose.cs} | 38 +- ...penAIPageableListOfAgent.Serialization.cs} | 54 +- .../Generated/OpenAIPageableListOfAgent.cs} | 16 +- .../OpenAIPageableListOfAgentObject.cs | 2 +- ...enAIPageableListOfRunStep.Serialization.cs | 190 +++ .../Generated/OpenAIPageableListOfRunStep.cs} | 16 +- .../OpenAIPageableListOfRunStepObject.cs | 2 +- ...eableListOfThreadMessage.Serialization.cs} | 54 +- .../OpenAIPageableListOfThreadMessage.cs} | 16 +- ...OpenAIPageableListOfThreadMessageObject.cs | 2 +- ...IPageableListOfThreadRun.Serialization.cs} | 44 +- .../OpenAIPageableListOfThreadRun.cs} | 16 +- .../OpenAIPageableListOfThreadRunObject.cs | 2 +- ...ageableListOfVectorStore.Serialization.cs} | 48 +- .../OpenAIPageableListOfVectorStore.cs} | 18 +- ...bleListOfVectorStoreFile.Serialization.cs} | 54 +- .../OpenAIPageableListOfVectorStoreFile.cs} | 18 +- ...enAIPageableListOfVectorStoreFileObject.cs | 48 + .../OpenAIPageableListOfVectorStoreObject.cs | 48 + ...enApiAnonymousAuthDetails.Serialization.cs | 2 +- .../Generated/OpenApiAnonymousAuthDetails.cs | 2 +- .../OpenApiAuthDetails.Serialization.cs | 2 +- .../src/Generated/OpenApiAuthDetails.cs | 2 +- .../src/Generated/OpenApiAuthType.cs | 2 +- ...nApiConnectionAuthDetails.Serialization.cs | 2 +- .../Generated/OpenApiConnectionAuthDetails.cs | 2 +- ...iConnectionSecurityScheme.Serialization.cs | 2 +- .../OpenApiConnectionSecurityScheme.cs | 2 +- ...OpenApiFunctionDefinition.Serialization.cs | 2 +- .../Generated/OpenApiFunctionDefinition.cs | 2 +- ...OpenApiManagedAuthDetails.Serialization.cs | 2 +- .../Generated/OpenApiManagedAuthDetails.cs | 2 +- ...nApiManagedSecurityScheme.Serialization.cs | 2 +- .../Generated/OpenApiManagedSecurityScheme.cs | 2 +- .../OpenApiToolDefinition.Serialization.cs | 2 +- .../src/Generated/OpenApiToolDefinition.cs | 2 +- .../Generated/RequiredAction.Serialization.cs | 2 +- .../src/Generated/RequiredAction.cs | 2 +- .../RequiredFunctionToolCall.Serialization.cs | 16 +- .../src/Generated/RequiredFunctionToolCall.cs | 12 +- .../RequiredToolCall.Serialization.cs | 26 +- .../src/Generated/RequiredToolCall.cs | 83 ++ .../src/Generated/ResponseFormat.cs | 2 +- .../ResponseFormatJsonSchema.Serialization.cs | 2 +- .../src/Generated/ResponseFormatJsonSchema.cs | 2 +- ...ponseFormatJsonSchemaType.Serialization.cs | 2 +- .../Generated/ResponseFormatJsonSchemaType.cs | 2 +- .../ResponseFormatJsonSchemaTypeType.cs | 2 +- .../src/Generated/RunAdditionalFieldList.cs | 2 +- .../RunCompletionUsage.Serialization.cs | 2 +- .../src/Generated/RunCompletionUsage.cs | 2 +- .../src/Generated/RunError.Serialization.cs | 2 +- .../src/Generated/RunError.cs | 2 +- .../src/Generated/RunStatus.cs | 2 +- .../src/Generated/RunStep.Serialization.cs | 38 +- .../src/Generated/RunStep.cs | 22 +- ...StepAzureAISearchToolCall.Serialization.cs | 2 +- .../Generated/RunStepAzureAISearchToolCall.cs | 2 +- ...StepBingGroundingToolCall.Serialization.cs | 2 +- .../Generated/RunStepBingGroundingToolCall.cs | 2 +- ...odeInterpreterImageOutput.Serialization.cs | 4 +- .../RunStepCodeInterpreterImageOutput.cs | 4 +- ...InterpreterImageReference.Serialization.cs | 4 +- .../RunStepCodeInterpreterImageReference.cs | 4 +- ...pCodeInterpreterLogOutput.Serialization.cs | 4 +- .../RunStepCodeInterpreterLogOutput.cs | 4 +- ...epCodeInterpreterToolCall.Serialization.cs | 4 +- .../RunStepCodeInterpreterToolCall.cs | 5 +- ...InterpreterToolCallOutput.Serialization.cs | 4 +- .../RunStepCodeInterpreterToolCallOutput.cs | 4 +- .../RunStepCompletionUsage.Serialization.cs | 2 +- .../src/Generated/RunStepCompletionUsage.cs | 2 +- .../Generated/RunStepDelta.Serialization.cs | 2 +- .../src/Generated/RunStepDelta.cs | 2 +- .../RunStepDeltaChunk.Serialization.cs | 2 +- .../src/Generated/RunStepDeltaChunk.cs | 2 +- .../src/Generated/RunStepDeltaChunkObject.cs | 2 +- ...terpreterDetailItemObject.Serialization.cs | 2 +- ...tepDeltaCodeInterpreterDetailItemObject.cs | 2 +- ...odeInterpreterImageOutput.Serialization.cs | 2 +- .../RunStepDeltaCodeInterpreterImageOutput.cs | 2 +- ...erpreterImageOutputObject.Serialization.cs | 2 +- ...epDeltaCodeInterpreterImageOutputObject.cs | 2 +- ...aCodeInterpreterLogOutput.Serialization.cs | 2 +- .../RunStepDeltaCodeInterpreterLogOutput.cs | 2 +- ...eltaCodeInterpreterOutput.Serialization.cs | 2 +- .../RunStepDeltaCodeInterpreterOutput.cs | 2 +- ...taCodeInterpreterToolCall.Serialization.cs | 2 +- .../RunStepDeltaCodeInterpreterToolCall.cs | 2 +- .../RunStepDeltaDetail.Serialization.cs | 2 +- .../src/Generated/RunStepDeltaDetail.cs | 2 +- ...epDeltaFileSearchToolCall.Serialization.cs | 2 +- .../RunStepDeltaFileSearchToolCall.cs | 2 +- .../RunStepDeltaFunction.Serialization.cs | 2 +- .../src/Generated/RunStepDeltaFunction.cs | 2 +- ...StepDeltaFunctionToolCall.Serialization.cs | 2 +- .../Generated/RunStepDeltaFunctionToolCall.cs | 2 +- ...nStepDeltaMessageCreation.Serialization.cs | 2 +- .../Generated/RunStepDeltaMessageCreation.cs | 2 +- ...eltaMessageCreationObject.Serialization.cs | 2 +- .../RunStepDeltaMessageCreationObject.cs | 2 +- .../RunStepDeltaToolCall.Serialization.cs | 2 +- .../src/Generated/RunStepDeltaToolCall.cs | 2 +- ...unStepDeltaToolCallObject.Serialization.cs | 2 +- .../Generated/RunStepDeltaToolCallObject.cs | 2 +- .../Generated/RunStepDetails.Serialization.cs | 2 +- .../src/Generated/RunStepDetails.cs | 2 +- .../Generated/RunStepError.Serialization.cs | 2 +- .../src/Generated/RunStepError.cs | 2 +- .../src/Generated/RunStepErrorCode.cs | 2 +- ...RunStepFileSearchToolCall.Serialization.cs | 2 +- .../Generated/RunStepFileSearchToolCall.cs | 2 +- ...pFileSearchToolCallResult.Serialization.cs | 2 +- .../RunStepFileSearchToolCallResult.cs | 2 +- ...FileSearchToolCallResults.Serialization.cs | 2 +- .../RunStepFileSearchToolCallResults.cs | 2 +- .../RunStepFunctionToolCall.Serialization.cs | 4 +- .../src/Generated/RunStepFunctionToolCall.cs | 5 +- ...tepMessageCreationDetails.Serialization.cs | 2 +- .../RunStepMessageCreationDetails.cs | 2 +- ...pMessageCreationReference.Serialization.cs | 2 +- .../RunStepMessageCreationReference.cs | 2 +- ...epMicrosoftFabricToolCall.Serialization.cs | 2 +- .../RunStepMicrosoftFabricToolCall.cs | 2 +- .../src/Generated/RunStepObject.cs | 48 + ...RunStepSharepointToolCall.Serialization.cs | 2 +- .../Generated/RunStepSharepointToolCall.cs | 2 +- .../src/Generated/RunStepStatus.cs | 2 +- .../src/Generated/RunStepStreamEvent.cs | 2 +- .../RunStepToolCall.Serialization.cs | 2 +- .../src/Generated/RunStepToolCall.cs | 2 +- .../RunStepToolCallDetails.Serialization.cs | 2 +- .../src/Generated/RunStepToolCallDetails.cs | 2 +- .../src/Generated/RunStepType.cs | 2 +- .../src/Generated/RunStreamEvent.cs | 2 +- .../SharepointToolDefinition.Serialization.cs | 2 +- .../src/Generated/SharepointToolDefinition.cs | 2 +- .../SubmitToolOutputsAction.Serialization.cs | 4 +- .../src/Generated/SubmitToolOutputsAction.cs | 5 +- ...itToolOutputsToRunRequest.Serialization.cs | 2 +- .../SubmitToolOutputsToRunRequest.cs | 2 +- .../ThreadDeletionStatus.Serialization.cs | 2 +- .../src/Generated/ThreadDeletionStatus.cs | 2 +- .../Generated/ThreadDeletionStatusObject.cs | 2 +- .../Generated/ThreadMessage.Serialization.cs | 12 +- .../src/Generated/ThreadMessage.cs | 18 +- .../src/Generated/ThreadMessageObject.cs | 48 + .../ThreadMessageOptions.Serialization.cs | 2 +- .../src/Generated/ThreadMessageOptions.cs | 2 +- .../src/Generated/ThreadRun.Serialization.cs | 45 +- .../src/Generated/ThreadRun.cs | 26 +- .../src/Generated/ThreadRunObject.cs | 48 + .../src/Generated/ThreadStreamEvent.cs | 2 +- .../Generated/ToolConnection.Serialization.cs | 2 +- .../src/Generated/ToolConnection.cs | 2 +- .../ToolConnectionList.Serialization.cs | 2 +- .../src/Generated/ToolConnectionList.cs | 2 +- .../Generated/ToolDefinition.Serialization.cs | 2 +- .../src/Generated/ToolDefinition.cs | 2 +- .../src/Generated/ToolOutput.Serialization.cs | 2 +- .../src/Generated/ToolOutput.cs | 2 +- .../Generated/ToolResources.Serialization.cs | 2 +- .../src/Generated/ToolResources.cs | 2 +- .../TruncationObject.Serialization.cs | 2 +- .../src/Generated/TruncationObject.cs | 2 +- .../src/Generated/TruncationStrategy.cs | 2 +- .../UnknownMessageContent.Serialization.cs | 2 +- .../src/Generated/UnknownMessageContent.cs | 2 +- ...nknownMessageDeltaContent.Serialization.cs | 2 +- .../Generated/UnknownMessageDeltaContent.cs | 2 +- ...essageDeltaTextAnnotation.Serialization.cs | 2 +- .../UnknownMessageDeltaTextAnnotation.cs | 2 +- ...nownMessageTextAnnotation.Serialization.cs | 2 +- .../Generated/UnknownMessageTextAnnotation.cs | 2 +- ...UnknownOpenApiAuthDetails.Serialization.cs | 2 +- .../Generated/UnknownOpenApiAuthDetails.cs | 2 +- .../UnknownRequiredAction.Serialization.cs | 2 +- .../src/Generated/UnknownRequiredAction.cs | 2 +- .../UnknownRequiredToolCall.Serialization.cs | 14 +- .../src/Generated/UnknownRequiredToolCall.cs | 8 +- ...InterpreterToolCallOutput.Serialization.cs | 2 +- ...ownRunStepCodeInterpreterToolCallOutput.cs | 2 +- ...eltaCodeInterpreterOutput.Serialization.cs | 2 +- ...nknownRunStepDeltaCodeInterpreterOutput.cs | 2 +- ...UnknownRunStepDeltaDetail.Serialization.cs | 2 +- .../Generated/UnknownRunStepDeltaDetail.cs | 2 +- ...knownRunStepDeltaToolCall.Serialization.cs | 2 +- .../Generated/UnknownRunStepDeltaToolCall.cs | 2 +- .../UnknownRunStepDetails.Serialization.cs | 2 +- .../src/Generated/UnknownRunStepDetails.cs | 2 +- .../UnknownRunStepToolCall.Serialization.cs | 2 +- .../src/Generated/UnknownRunStepToolCall.cs | 2 +- .../UnknownToolDefinition.Serialization.cs | 2 +- .../src/Generated/UnknownToolDefinition.cs | 2 +- ...reChunkingStrategyRequest.Serialization.cs | 2 +- ...knownVectorStoreChunkingStrategyRequest.cs | 2 +- ...eChunkingStrategyResponse.Serialization.cs | 2 +- ...nownVectorStoreChunkingStrategyResponse.cs | 2 +- .../UpdateAgentRequest.Serialization.cs | 2 +- .../src/Generated/UpdateAgentRequest.cs | 2 +- ...preterToolResourceOptions.Serialization.cs | 2 +- ...pdateCodeInterpreterToolResourceOptions.cs | 2 +- ...SearchToolResourceOptions.Serialization.cs | 2 +- .../UpdateFileSearchToolResourceOptions.cs | 2 +- .../UpdateMessageRequest.Serialization.cs | 2 +- .../src/Generated/UpdateMessageRequest.cs | 2 +- .../UpdateRunRequest.Serialization.cs | 2 +- .../src/Generated/UpdateRunRequest.cs | 2 +- .../UpdateThreadRequest.Serialization.cs | 2 +- .../src/Generated/UpdateThreadRequest.cs | 2 +- ...pdateToolResourcesOptions.Serialization.cs | 2 +- .../Generated/UpdateToolResourcesOptions.cs | 2 +- .../UploadFileRequest.Serialization.cs | 18 +- .../src/Generated/UploadFileRequest.cs | 8 +- .../Generated/VectorStore.Serialization.cs | 2 +- .../src/Generated/VectorStore.cs | 2 +- ...toChunkingStrategyRequest.Serialization.cs | 2 +- .../VectorStoreAutoChunkingStrategyRequest.cs | 2 +- ...oChunkingStrategyResponse.Serialization.cs | 2 +- ...VectorStoreAutoChunkingStrategyResponse.cs | 2 +- ...reChunkingStrategyRequest.Serialization.cs | 2 +- .../VectorStoreChunkingStrategyRequest.cs | 2 +- .../VectorStoreChunkingStrategyRequestType.cs | 2 +- ...eChunkingStrategyResponse.Serialization.cs | 2 +- .../VectorStoreChunkingStrategyResponse.cs | 2 +- ...VectorStoreChunkingStrategyResponseType.cs | 2 +- .../VectorStoreConfiguration.Serialization.cs | 2 +- .../src/Generated/VectorStoreConfiguration.cs | 2 +- ...VectorStoreConfigurations.Serialization.cs | 2 +- .../Generated/VectorStoreConfigurations.cs | 2 +- .../VectorStoreDataSource.Serialization.cs | 2 +- .../src/Generated/VectorStoreDataSource.cs | 2 +- .../VectorStoreDataSourceAssetType.cs | 2 +- ...VectorStoreDeletionStatus.Serialization.cs | 2 +- .../Generated/VectorStoreDeletionStatus.cs | 2 +- .../VectorStoreDeletionStatusObject.cs | 2 +- ...ctorStoreExpirationPolicy.Serialization.cs | 2 +- .../Generated/VectorStoreExpirationPolicy.cs | 2 +- .../VectorStoreExpirationPolicyAnchor.cs | 2 +- .../VectorStoreFile.Serialization.cs | 2 +- .../src/Generated/VectorStoreFile.cs | 2 +- .../VectorStoreFileBatch.Serialization.cs | 2 +- .../src/Generated/VectorStoreFileBatch.cs | 2 +- .../Generated/VectorStoreFileBatchObject.cs | 2 +- .../Generated/VectorStoreFileBatchStatus.cs | 2 +- .../VectorStoreFileCount.Serialization.cs | 2 +- .../src/Generated/VectorStoreFileCount.cs | 2 +- ...orStoreFileDeletionStatus.Serialization.cs | 2 +- .../VectorStoreFileDeletionStatus.cs | 2 +- .../VectorStoreFileDeletionStatusObject.cs | 2 +- .../VectorStoreFileError.Serialization.cs | 2 +- .../src/Generated/VectorStoreFileError.cs | 2 +- .../src/Generated/VectorStoreFileErrorCode.cs | 2 +- .../src/Generated/VectorStoreFileObject.cs | 2 +- .../src/Generated/VectorStoreFileStatus.cs | 2 +- .../Generated/VectorStoreFileStatusFilter.cs | 2 +- .../src/Generated/VectorStoreObject.cs | 2 +- ...icChunkingStrategyOptions.Serialization.cs | 2 +- ...ectorStoreStaticChunkingStrategyOptions.cs | 2 +- ...icChunkingStrategyRequest.Serialization.cs | 2 +- ...ectorStoreStaticChunkingStrategyRequest.cs | 2 +- ...cChunkingStrategyResponse.Serialization.cs | 2 +- ...ctorStoreStaticChunkingStrategyResponse.cs | 2 +- .../src/Generated/VectorStoreStatus.cs | 2 +- .../src/Properties/AssemblyInfo.cs | 11 + .../tests/Azure.AI.Agents.Tests.csproj | 20 + sdk/ai/Azure.AI.Agents/tsp-location.yaml | 4 + .../src/Generated/AIProjectClient.cs | 10 - .../src/Generated/AIProjectsModelFactory.cs | 742 ------------ ...gentPageableListOfVectorStoreFileObject.cs | 48 - .../AgentPageableListOfVectorStoreObject.cs | 48 - ...geableListOfThreadMessage.Serialization.cs | 190 --- .../src/Generated/RequiredToolCall.cs | 47 - sdk/ai/Azure.AI.Projects/tsp-location.yaml | 2 +- sdk/ai/ci.yml | 35 + 453 files changed, 5420 insertions(+), 1996 deletions(-) create mode 100644 sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln create mode 100644 sdk/ai/Azure.AI.Agents/CHANGELOG.md create mode 100644 sdk/ai/Azure.AI.Agents/Directory.Build.props create mode 100644 sdk/ai/Azure.AI.Agents/README.md create mode 100644 sdk/ai/Azure.AI.Agents/src/Azure.AI.Agents.csproj create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsClientBuilderExtensions.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsModelFactory.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/Agent.Serialization.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/Agent.cs (96%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/AgentObject.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentStreamEvent.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentThread.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentThread.cs (93%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentThreadCreationOptions.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentThreadCreationOptions.cs (99%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadObject.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsApiResponseFormat.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsApiResponseFormat.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsApiResponseFormatMode.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsApiToolChoiceOptionMode.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsClient.cs (92%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/AgentsClientOptions.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsNamedToolChoice.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsNamedToolChoice.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AgentsNamedToolChoiceType.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureAISearchResource.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureAISearchResource.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureAISearchToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureAISearchToolDefinition.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureFunctionBinding.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureFunctionBinding.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureFunctionBindingType.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureFunctionStorageQueue.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureFunctionStorageQueue.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureFunctionToolDefinition.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/AzureFunctionToolDefinition.cs (59%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/BingGroundingToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/BingGroundingToolDefinition.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CodeInterpreterToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CodeInterpreterToolDefinition.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CodeInterpreterToolResource.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CodeInterpreterToolResource.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateAgentRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateAgentRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateMessageRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateMessageRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateRunRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateRunRequest.cs (93%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateThreadAndRunRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateThreadAndRunRequest.cs (93%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateThreadRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateThreadRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateVectorStoreFileBatchRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateVectorStoreFileRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateVectorStoreFileRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateVectorStoreRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/CreateVectorStoreRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/DoneEvent.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ErrorEvent.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchRankingOptions.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchRankingOptions.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolCallContent.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolCallContent.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolCallContentType.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolDefinition.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolDefinitionDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolResource.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileSearchToolResource.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FileState.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FunctionName.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FunctionName.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FunctionToolDefinition.Serialization.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/FunctionToolDefinition.cs (60%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/IncompleteDetailsReason.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/IncompleteRunDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/IncompleteRunDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/IndexResource.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/IndexResource.cs (99%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/Internal/Argument.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/Internal/MultipartFormDataRequestContent.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/Internal/Optional.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/Internal/Utf8JsonRequestContent.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalAgentDeletionStatus.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalAgentDeletionStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalAgentDeletionStatusObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalAzureFunctionDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalAzureFunctionDefinition.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalCodeInterpreterToolCallDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFileDeletionStatus.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFileDeletionStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFileDeletionStatusObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFileListResponse.Serialization.cs (96%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFileListResponse.cs (92%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFileListResponseObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFunctionDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalFunctionDefinition.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageImageFileDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageImageFileDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageTextDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageTextDetails.cs (91%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageTextFileCitationDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalMessageTextFilePathDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalRequiredFunctionToolCallDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalRunStepFunctionToolCallDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/InternalSubmitToolOutputsDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ListSortOrder.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageAttachment.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageAttachment.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageContent.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageContent.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDelta.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDelta.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaChunk.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaChunk.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaChunkObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaContent.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaContent.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaImageFileContent.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaImageFileContent.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaImageFileContentObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextAnnotation.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextAnnotation.cs (95%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextContent.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextContent.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextContentObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextContentObject.cs (91%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFileCitationAnnotation.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFilePathAnnotation.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs (98%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.Serialization.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.Serialization.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageImageFileContent.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageImageFileContent.cs (60%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageIncompleteDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageIncompleteDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageIncompleteDetailsReason.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageRole.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageStatus.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageStreamEvent.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextAnnotation.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextAnnotation.cs (95%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextContent.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextContent.cs (60%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextFileCitationAnnotation.cs (63%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextFilePathAnnotation.Serialization.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MessageTextFilePathAnnotation.cs (64%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.Serialization.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.Serialization.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/MicrosoftFabricToolDefinition.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ModifyVectorStoreRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ModifyVectorStoreRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects/src/Generated/AgentFile.Serialization.cs => Azure.AI.Agents/src/Generated/OpenAIFile.Serialization.cs} (75%) rename sdk/ai/{Azure.AI.Projects/src/Generated/AgentFile.cs => Azure.AI.Agents/src/Generated/OpenAIFile.cs} (83%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFileObject.cs rename sdk/ai/{Azure.AI.Projects/src/Generated/AgentFilePurpose.cs => Azure.AI.Agents/src/Generated/OpenAIFilePurpose.cs} (53%) rename sdk/ai/{Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.Serialization.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.Serialization.cs} (66%) rename sdk/ai/{Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.cs} (82%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenAIPageableListOfAgentObject.cs (98%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.Serialization.cs rename sdk/ai/{Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.cs} (82%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenAIPageableListOfRunStepObject.cs (98%) rename sdk/ai/{Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.Serialization.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.Serialization.cs} (72%) rename sdk/ai/{Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.cs} (81%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenAIPageableListOfThreadMessageObject.cs (98%) rename sdk/ai/{Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.Serialization.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.Serialization.cs} (70%) rename sdk/ai/{Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.cs} (82%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenAIPageableListOfThreadRunObject.cs (98%) rename sdk/ai/{Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.Serialization.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.Serialization.cs} (69%) rename sdk/ai/{Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.cs} (80%) rename sdk/ai/{Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.Serialization.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.Serialization.cs} (71%) rename sdk/ai/{Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.cs => Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.cs} (79%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFileObject.cs create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreObject.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiAnonymousAuthDetails.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiAuthDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiAuthDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiAuthType.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiConnectionAuthDetails.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiConnectionSecurityScheme.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiFunctionDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiFunctionDefinition.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiManagedAuthDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiManagedAuthDetails.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiManagedSecurityScheme.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/OpenApiToolDefinition.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RequiredAction.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RequiredAction.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RequiredFunctionToolCall.Serialization.cs (96%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RequiredFunctionToolCall.cs (79%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RequiredToolCall.Serialization.cs (84%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/RequiredToolCall.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ResponseFormat.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ResponseFormatJsonSchema.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ResponseFormatJsonSchema.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ResponseFormatJsonSchemaType.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ResponseFormatJsonSchemaTypeType.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunAdditionalFieldList.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunCompletionUsage.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunCompletionUsage.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunError.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunError.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStep.Serialization.cs (90%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStep.cs (87%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepAzureAISearchToolCall.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepBingGroundingToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepBingGroundingToolCall.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterImageOutput.cs (93%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterImageReference.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterLogOutput.cs (93%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterToolCall.cs (92%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCodeInterpreterToolCallOutput.cs (96%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCompletionUsage.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepCompletionUsage.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDelta.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDelta.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaChunk.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaChunk.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaChunkObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterOutput.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaDetail.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaDetail.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaFileSearchToolCall.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaFunction.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaFunction.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaFunctionToolCall.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaMessageCreation.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaMessageCreation.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaMessageCreationObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaToolCall.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaToolCallObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDeltaToolCallObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepError.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepError.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepErrorCode.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFileSearchToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFileSearchToolCall.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFileSearchToolCallResult.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFileSearchToolCallResults.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFunctionToolCall.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepFunctionToolCall.cs (91%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepMessageCreationDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepMessageCreationDetails.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepMessageCreationReference.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepMessageCreationReference.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepMicrosoftFabricToolCall.cs (98%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/RunStepObject.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepSharepointToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepSharepointToolCall.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepStreamEvent.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepToolCall.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepToolCallDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepToolCallDetails.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStepType.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/RunStreamEvent.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/SharepointToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/SharepointToolDefinition.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/SubmitToolOutputsAction.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/SubmitToolOutputsAction.cs (90%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/SubmitToolOutputsToRunRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadDeletionStatus.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadDeletionStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadDeletionStatusObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadMessage.Serialization.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadMessage.cs (89%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageObject.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadMessageOptions.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadMessageOptions.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadRun.Serialization.cs (93%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadRun.cs (88%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Generated/ThreadRunObject.cs rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ThreadStreamEvent.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolConnection.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolConnection.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolConnectionList.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolConnectionList.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolDefinition.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolOutput.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolOutput.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolResources.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/ToolResources.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/TruncationObject.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/TruncationObject.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/TruncationStrategy.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageContent.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageContent.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageDeltaContent.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageDeltaContent.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageDeltaTextAnnotation.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageTextAnnotation.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownMessageTextAnnotation.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownOpenApiAuthDetails.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRequiredAction.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRequiredAction.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRequiredToolCall.Serialization.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRequiredToolCall.cs (75%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDeltaDetail.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDeltaToolCall.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDetails.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepDetails.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepToolCall.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownRunStepToolCall.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownToolDefinition.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownToolDefinition.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateAgentRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateAgentRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateFileSearchToolResourceOptions.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateMessageRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateMessageRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateRunRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateRunRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateThreadRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateThreadRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateToolResourcesOptions.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UpdateToolResourcesOptions.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UploadFileRequest.Serialization.cs (92%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/UploadFileRequest.cs (92%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStore.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStore.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs (97%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreChunkingStrategyRequest.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreChunkingStrategyRequestType.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreChunkingStrategyResponse.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreChunkingStrategyResponseType.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreConfiguration.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreConfiguration.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreConfigurations.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreConfigurations.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreDataSource.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreDataSource.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreDataSourceAssetType.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreDeletionStatus.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreDeletionStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreDeletionStatusObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreExpirationPolicy.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreExpirationPolicy.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreExpirationPolicyAnchor.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFile.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFile.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileBatch.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileBatch.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileBatchObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileBatchStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileCount.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileCount.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileDeletionStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileDeletionStatusObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileError.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileError.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileErrorCode.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileStatus.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreFileStatusFilter.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreObject.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs (99%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs (98%) rename sdk/ai/{Azure.AI.Projects => Azure.AI.Agents}/src/Generated/VectorStoreStatus.cs (99%) create mode 100644 sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs create mode 100644 sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj create mode 100644 sdk/ai/Azure.AI.Agents/tsp-location.yaml delete mode 100644 sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFileObject.cs delete mode 100644 sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreObject.cs delete mode 100644 sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.Serialization.cs delete mode 100644 sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.cs create mode 100644 sdk/ai/ci.yml diff --git a/sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln b/sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln new file mode 100644 index 000000000000..377bd9a46c50 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Agents", "src\Azure.AI.Agents.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Agents.Tests", "tests\Azure.AI.Agents.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/ai/Azure.AI.Agents/CHANGELOG.md b/sdk/ai/Azure.AI.Agents/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents/Directory.Build.props b/sdk/ai/Azure.AI.Agents/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/ai/Azure.AI.Agents/README.md b/sdk/ai/Azure.AI.Agents/README.md new file mode 100644 index 000000000000..3bd6a50545dd --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/README.md @@ -0,0 +1,107 @@ +# Azure.AI.Agents client library for .NET + +Azure.AI.Agents is a managed service that helps developers get secret simply and securely. + +Use the client library for to: + +* [Get secret](https://docs.microsoft.com/azure) + +[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples] + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.AI.Agents --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateClientForSpecificApiVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.) +var client = new Client(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents/samples). + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/ai/Azure.AI.Agents/README.png) \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents/src/Azure.AI.Agents.csproj b/sdk/ai/Azure.AI.Agents/src/Azure.AI.Agents.csproj new file mode 100644 index 000000000000..29380a01c002 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Azure.AI.Agents.csproj @@ -0,0 +1,19 @@ + + + This is the Azure.AI.Agents client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.AI.Agents for Azure Data Plane + 1.0.0-beta.1 + Azure.AI.Agents + $(RequiredTargetFrameworks) + true + + + + + + + + + + + diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsClientBuilderExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsClientBuilderExtensions.cs new file mode 100644 index 000000000000..932566684e89 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsClientBuilderExtensions.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.AI.Agents; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AIAgentsClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. + /// The Azure subscription ID. + /// The name of the Azure Resource Group. + /// The Azure AI Foundry project name. + public static IAzureClientBuilder AddAgentsClient(this TBuilder builder, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new AgentsClient(endpoint, subscriptionId, resourceGroupName, projectName, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAgentsClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsModelFactory.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsModelFactory.cs new file mode 100644 index 000000000000..920a0a5908d6 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsModelFactory.cs @@ -0,0 +1,1053 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace Azure.AI.Agents +{ + /// Model factory for models. + public static partial class AIAgentsModelFactory + { + /// Initializes a new instance of . + /// The type of binding, which is always 'storage_queue'. + /// Storage queue. + /// A new instance for mocking. + public static AzureFunctionBinding AzureFunctionBinding(AzureFunctionBindingType type = default, AzureFunctionStorageQueue storageQueue = null) + { + return new AzureFunctionBinding(type, storageQueue, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Type. + /// The JSON schema, describing response format. + /// A new instance for mocking. + public static ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(ResponseFormatJsonSchemaTypeType type = default, ResponseFormatJsonSchema jsonSchema = null) + { + return new ResponseFormatJsonSchemaType(type, jsonSchema, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always assistant. + /// The Unix timestamp, in seconds, representing when this object was created. + /// The name of the agent. + /// The description of the agent. + /// The ID of the model to use. + /// The system instructions for the agent to use. + /// + /// The collection of tools enabled for the agent. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , and . + /// + /// + /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` + /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + /// + /// + /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, + /// while lower values like 0.2 will make it more focused and deterministic. + /// + /// + /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. + /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. + /// + /// We generally recommend altering this or temperature but not both. + /// + /// The response format of the tool calls used by this agent. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// A new instance for mocking. + public static Agent Agent(string id = null, AgentObject @object = default, DateTimeOffset createdAt = default, string name = null, string description = null, string model = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null) + { + tools ??= new List(); + metadata ??= new Dictionary(); + + return new Agent( + id, + @object, + createdAt, + name, + description, + model, + instructions, + tools?.ToList(), + toolResources, + temperature, + topP, + responseFormat, + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The role of the entity that is creating the message. Allowed values include: + /// - `user`: Indicates the message is sent by an actual user and should be used in most + /// cases to represent user-generated messages. + /// - `assistant`: Indicates the message is generated by the agent. Use this value to insert + /// messages from the agent into the + /// conversation. + /// + /// + /// The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via + /// a separate call to the create message API. + /// + /// A list of files attached to the message, and the tools they should be added to. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// A new instance for mocking. + public static ThreadMessageOptions ThreadMessageOptions(MessageRole role = default, string content = null, IEnumerable attachments = null, IDictionary metadata = null) + { + attachments ??= new List(); + metadata ??= new Dictionary(); + + return new ThreadMessageOptions(role, content, attachments?.ToList(), metadata, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always 'thread'. + /// The Unix timestamp, in seconds, representing when this object was created. + /// + /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type + /// of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list + /// of vector store IDs. + /// + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// A new instance for mocking. + public static AgentThread AgentThread(string id = null, AgentThreadObject @object = default, DateTimeOffset createdAt = default, ToolResources toolResources = null, IReadOnlyDictionary metadata = null) + { + metadata ??= new Dictionary(); + + return new AgentThread( + id, + @object, + createdAt, + toolResources, + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always 'thread.message'. + /// The Unix timestamp, in seconds, representing when this object was created. + /// The ID of the thread that this message belongs to. + /// The status of the message. + /// On an incomplete message, details about why the message is incomplete. + /// The Unix timestamp (in seconds) for when the message was completed. + /// The Unix timestamp (in seconds) for when the message was marked as incomplete. + /// The role associated with the agent thread message. + /// + /// The list of content items associated with the agent thread message. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// If applicable, the ID of the agent that authored this message. + /// If applicable, the ID of the run associated with the authoring of this message. + /// A list of files attached to the message, and the tools they were added to. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// A new instance for mocking. + public static ThreadMessage ThreadMessage(string id = null, ThreadMessageObject @object = default, DateTimeOffset createdAt = default, string threadId = null, MessageStatus status = default, MessageIncompleteDetails incompleteDetails = null, DateTimeOffset? completedAt = null, DateTimeOffset? incompleteAt = null, MessageRole role = default, IEnumerable contentItems = null, string agentId = null, string runId = null, IEnumerable attachments = null, IReadOnlyDictionary metadata = null) + { + contentItems ??= new List(); + attachments ??= new List(); + metadata ??= new Dictionary(); + + return new ThreadMessage( + id, + @object, + createdAt, + threadId, + status, + incompleteDetails, + completedAt, + incompleteAt, + role, + contentItems?.ToList(), + agentId, + runId, + attachments?.ToList(), + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The provided reason describing why the message was marked as incomplete. + /// A new instance for mocking. + public static MessageIncompleteDetails MessageIncompleteDetails(MessageIncompleteDetailsReason reason = default) + { + return new MessageIncompleteDetails(reason, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The object type. + /// The textual content associated with this text annotation item. + /// A new instance for mocking. + public static MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null) + { + return new UnknownMessageTextAnnotation(type, text, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The textual content associated with this text annotation item. + /// The details of the URL citation. + /// The first text index associated with this text annotation. + /// The last text index associated with this text annotation. + /// A new instance for mocking. + public static MessageTextUrlCitationAnnotation MessageTextUrlCitationAnnotation(string text = null, MessageTextUrlCitationDetails urlCitation = null, int? startIndex = null, int? endIndex = null) + { + return new MessageTextUrlCitationAnnotation( + "url_citation", + text, + serializedAdditionalRawData: null, + urlCitation, + startIndex, + endIndex); + } + + /// Initializes a new instance of . + /// The URL associated with this citation. + /// The title of the URL. + /// A new instance for mocking. + public static MessageTextUrlCitationDetails MessageTextUrlCitationDetails(string url = null, string title = null) + { + return new MessageTextUrlCitationDetails(url, title, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always 'thread.run'. + /// The ID of the thread associated with this run. + /// The ID of the agent associated with the thread this run was performed against. + /// The status of the agent thread run. + /// + /// The details of the action required for the agent thread run to continue. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// The last error, if any, encountered by this agent thread run. + /// The ID of the model to use. + /// The overridden system instructions used for this agent thread run. + /// + /// The overridden enabled tools used for this agent thread run. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , and . + /// + /// The Unix timestamp, in seconds, representing when this object was created. + /// The Unix timestamp, in seconds, representing when this item expires. + /// The Unix timestamp, in seconds, representing when this item was started. + /// The Unix timestamp, in seconds, representing when this completed. + /// The Unix timestamp, in seconds, representing when this was cancelled. + /// The Unix timestamp, in seconds, representing when this failed. + /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. + /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). + /// The sampling temperature used for this run. If not set, defaults to 1. + /// The nucleus sampling value used for this run. If not set, defaults to 1. + /// The maximum number of prompt tokens specified to have been used over the course of the run. + /// The maximum number of completion tokens specified to have been used over the course of the run. + /// The strategy to use for dropping messages as the context windows moves forward. + /// Controls whether or not and which tool is called by the model. + /// The response format of the tool calls used in this run. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. + /// Determines if tools can be executed in parallel within the run. + /// A new instance for mocking. + public static ThreadRun ThreadRun(string id = null, ThreadRunObject @object = default, string threadId = null, string agentId = null, RunStatus status = default, RequiredAction requiredAction = null, RunError lastError = null, string model = null, string instructions = null, IEnumerable tools = null, DateTimeOffset createdAt = default, DateTimeOffset? expiresAt = null, DateTimeOffset? startedAt = null, DateTimeOffset? completedAt = null, DateTimeOffset? cancelledAt = null, DateTimeOffset? failedAt = null, IncompleteRunDetails incompleteDetails = null, RunCompletionUsage usage = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, UpdateToolResourcesOptions toolResources = null, bool parallelToolCalls = default) + { + tools ??= new List(); + metadata ??= new Dictionary(); + + return new ThreadRun( + id, + @object, + threadId, + agentId, + status, + requiredAction, + lastError, + model, + instructions, + tools?.ToList(), + createdAt, + expiresAt, + startedAt, + completedAt, + cancelledAt, + failedAt, + incompleteDetails, + usage, + temperature, + topP, + maxPromptTokens, + maxCompletionTokens, + truncationStrategy, + toolChoice, + responseFormat, + metadata, + toolResources, + parallelToolCalls, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The object type for the required tool call. + /// The ID of the tool call. This ID must be referenced when submitting tool outputs. + /// A new instance for mocking. + public static RequiredToolCall RequiredToolCall(string type = null, string id = null) + { + return new UnknownRequiredToolCall(type, id, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status for the error. + /// The human-readable text associated with the error. + /// A new instance for mocking. + public static RunError RunError(string code = null, string message = null) + { + return new RunError(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The reason why the run is incomplete. This indicates which specific token limit was reached during the run. + /// A new instance for mocking. + public static IncompleteRunDetails IncompleteRunDetails(IncompleteDetailsReason reason = default) + { + return new IncompleteRunDetails(reason, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of completion tokens used over the course of the run. + /// Number of prompt tokens used over the course of the run. + /// Total number of tokens used (prompt + completion). + /// A new instance for mocking. + public static RunCompletionUsage RunCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default) + { + return new RunCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always 'thread.run.step'. + /// The type of run step, which can be either message_creation or tool_calls. + /// The ID of the agent associated with the run step. + /// The ID of the thread that was run. + /// The ID of the run that this run step is a part of. + /// The status of this run step. + /// + /// The details for this run step. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// If applicable, information about the last error encountered by this run step. + /// The Unix timestamp, in seconds, representing when this object was created. + /// The Unix timestamp, in seconds, representing when this item expired. + /// The Unix timestamp, in seconds, representing when this completed. + /// The Unix timestamp, in seconds, representing when this was cancelled. + /// The Unix timestamp, in seconds, representing when this failed. + /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// A new instance for mocking. + public static RunStep RunStep(string id = null, RunStepObject @object = default, RunStepType type = default, string agentId = null, string threadId = null, string runId = null, RunStepStatus status = default, RunStepDetails stepDetails = null, RunStepError lastError = null, DateTimeOffset createdAt = default, DateTimeOffset? expiredAt = null, DateTimeOffset? completedAt = null, DateTimeOffset? cancelledAt = null, DateTimeOffset? failedAt = null, RunStepCompletionUsage usage = null, IReadOnlyDictionary metadata = null) + { + metadata ??= new Dictionary(); + + return new RunStep( + id, + @object, + type, + agentId, + threadId, + runId, + status, + stepDetails, + lastError, + createdAt, + expiredAt, + completedAt, + cancelledAt, + failedAt, + usage, + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Information about the message creation associated with this run step. + /// A new instance for mocking. + public static RunStepMessageCreationDetails RunStepMessageCreationDetails(RunStepMessageCreationReference messageCreation = null) + { + return new RunStepMessageCreationDetails(RunStepType.MessageCreation, serializedAdditionalRawData: null, messageCreation); + } + + /// Initializes a new instance of . + /// The ID of the message created by this run step. + /// A new instance for mocking. + public static RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null) + { + return new RunStepMessageCreationReference(messageId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// A list of tool call details for this run step. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// A new instance for mocking. + public static RunStepToolCallDetails RunStepToolCallDetails(IEnumerable toolCalls = null) + { + toolCalls ??= new List(); + + return new RunStepToolCallDetails(RunStepType.ToolCalls, serializedAdditionalRawData: null, toolCalls?.ToList()); + } + + /// Initializes a new instance of . + /// The object type. + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// A new instance for mocking. + public static RunStepToolCall RunStepToolCall(string type = null, string id = null) + { + return new UnknownRunStepToolCall(type, id, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// For now, this is always going to be an empty object. + /// A new instance for mocking. + public static RunStepFileSearchToolCall RunStepFileSearchToolCall(string id = null, RunStepFileSearchToolCallResults fileSearch = null) + { + return new RunStepFileSearchToolCall("file_search", id, serializedAdditionalRawData: null, fileSearch); + } + + /// Initializes a new instance of . + /// Ranking options for file search. + /// The array of a file search results. + /// A new instance for mocking. + public static RunStepFileSearchToolCallResults RunStepFileSearchToolCallResults(FileSearchRankingOptions rankingOptions = null, IEnumerable results = null) + { + results ??= new List(); + + return new RunStepFileSearchToolCallResults(rankingOptions, results?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the file that result was found in. + /// The name of the file that result was found in. + /// The score of the result. All values must be a floating point number between 0 and 1. + /// The content of the result that was found. The content is only included if requested via the include query parameter. + /// A new instance for mocking. + public static RunStepFileSearchToolCallResult RunStepFileSearchToolCallResult(string fileId = null, string fileName = null, float score = default, IEnumerable content = null) + { + content ??= new List(); + + return new RunStepFileSearchToolCallResult(fileId, fileName, score, content?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of the content. + /// The text content of the file. + /// A new instance for mocking. + public static FileSearchToolCallContent FileSearchToolCallContent(FileSearchToolCallContentType type = default, string text = null) + { + return new FileSearchToolCallContent(type, text, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, IReadOnlyDictionary bingGrounding = null) + { + bingGrounding ??= new Dictionary(); + + return new RunStepBingGroundingToolCall("bing_grounding", id, serializedAdditionalRawData: null, bingGrounding); + } + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, IReadOnlyDictionary azureAISearch = null) + { + azureAISearch ??= new Dictionary(); + + return new RunStepAzureAISearchToolCall("azure_ai_search", id, serializedAdditionalRawData: null, azureAISearch); + } + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, IReadOnlyDictionary sharePoint = null) + { + sharePoint ??= new Dictionary(); + + return new RunStepSharepointToolCall("sharepoint_grounding", id, serializedAdditionalRawData: null, sharePoint); + } + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, IReadOnlyDictionary microsoftFabric = null) + { + microsoftFabric ??= new Dictionary(); + + return new RunStepMicrosoftFabricToolCall("fabric_aiskill", id, serializedAdditionalRawData: null, microsoftFabric); + } + + /// Initializes a new instance of . + /// The error code for this error. + /// The human-readable text associated with this error. + /// A new instance for mocking. + public static RunStepError RunStepError(RunStepErrorCode code = default, string message = null) + { + return new RunStepError(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of completion tokens used over the course of the run step. + /// Number of prompt tokens used over the course of the run step. + /// Total number of tokens used (prompt + completion). + /// A new instance for mocking. + public static RunStepCompletionUsage RunStepCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default) + { + return new RunStepCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The object type, which is always 'file'. + /// The identifier, which can be referenced in API endpoints. + /// The size of the file, in bytes. + /// The name of the file. + /// The Unix timestamp, in seconds, representing when this object was created. + /// The intended purpose of a file. + /// The state of the file. This field is available in Azure OpenAI only. + /// The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. + /// A new instance for mocking. + public static OpenAIFile OpenAIFile(OpenAIFileObject @object = default, string id = null, int size = default, string filename = null, DateTimeOffset createdAt = default, OpenAIFilePurpose purpose = default, FileState? status = null, string statusDetails = null) + { + return new OpenAIFile( + @object, + id, + size, + filename, + createdAt, + purpose, + status, + statusDetails, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The object type, which is always list. + /// The requested list of items. + /// The first ID represented in this list. + /// The last ID represented in this list. + /// A value indicating whether there are additional values available not captured in this list. + /// A new instance for mocking. + public static OpenAIPageableListOfVectorStore OpenAIPageableListOfVectorStore(OpenAIPageableListOfVectorStoreObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default) + { + data ??= new List(); + + return new OpenAIPageableListOfVectorStore( + @object, + data?.ToList(), + firstId, + lastId, + hasMore, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always `vector_store`. + /// The Unix timestamp (in seconds) for when the vector store was created. + /// The name of the vector store. + /// The total number of bytes used by the files in the vector store. + /// Files count grouped by status processed or being processed by this vector store. + /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. + /// Details on when this vector store expires. + /// The Unix timestamp (in seconds) for when the vector store will expire. + /// The Unix timestamp (in seconds) for when the vector store was last active. + /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. + /// A new instance for mocking. + public static VectorStore VectorStore(string id = null, VectorStoreObject @object = default, DateTimeOffset createdAt = default, string name = null, int usageBytes = default, VectorStoreFileCount fileCounts = null, VectorStoreStatus status = default, VectorStoreExpirationPolicy expiresAfter = null, DateTimeOffset? expiresAt = null, DateTimeOffset? lastActiveAt = null, IReadOnlyDictionary metadata = null) + { + metadata ??= new Dictionary(); + + return new VectorStore( + id, + @object, + createdAt, + name, + usageBytes, + fileCounts, + status, + expiresAfter, + expiresAt, + lastActiveAt, + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The number of files that are currently being processed. + /// The number of files that have been successfully processed. + /// The number of files that have failed to process. + /// The number of files that were cancelled. + /// The total number of files. + /// A new instance for mocking. + public static VectorStoreFileCount VectorStoreFileCount(int inProgress = default, int completed = default, int failed = default, int cancelled = default, int total = default) + { + return new VectorStoreFileCount( + inProgress, + completed, + failed, + cancelled, + total, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The options for the static chunking strategy. + /// A new instance for mocking. + public static VectorStoreStaticChunkingStrategyRequest VectorStoreStaticChunkingStrategyRequest(VectorStoreStaticChunkingStrategyOptions @static = null) + { + return new VectorStoreStaticChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType.Static, serializedAdditionalRawData: null, @static); + } + + /// Initializes a new instance of . + /// The ID of the resource specified for deletion. + /// A value indicating whether deletion was successful. + /// The object type, which is always 'vector_store.deleted'. + /// A new instance for mocking. + public static VectorStoreDeletionStatus VectorStoreDeletionStatus(string id = null, bool deleted = default, VectorStoreDeletionStatusObject @object = default) + { + return new VectorStoreDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The object type, which is always list. + /// The requested list of items. + /// The first ID represented in this list. + /// The last ID represented in this list. + /// A value indicating whether there are additional values available not captured in this list. + /// A new instance for mocking. + public static OpenAIPageableListOfVectorStoreFile OpenAIPageableListOfVectorStoreFile(OpenAIPageableListOfVectorStoreFileObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default) + { + data ??= new List(); + + return new OpenAIPageableListOfVectorStoreFile( + @object, + data?.ToList(), + firstId, + lastId, + hasMore, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always `vector_store.file`. + /// + /// The total vector store usage in bytes. Note that this may be different from the original file + /// size. + /// + /// The Unix timestamp (in seconds) for when the vector store file was created. + /// The ID of the vector store that the file is attached to. + /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. + /// The last error associated with this vector store file. Will be `null` if there are no errors. + /// + /// The strategy used to chunk the file. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static VectorStoreFile VectorStoreFile(string id = null, VectorStoreFileObject @object = default, int usageBytes = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileStatus status = default, VectorStoreFileError lastError = null, VectorStoreChunkingStrategyResponse chunkingStrategy = null) + { + return new VectorStoreFile( + id, + @object, + usageBytes, + createdAt, + vectorStoreId, + status, + lastError, + chunkingStrategy, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// One of `server_error` or `rate_limit_exceeded`. + /// A human-readable description of the error. + /// A new instance for mocking. + public static VectorStoreFileError VectorStoreFileError(VectorStoreFileErrorCode code = default, string message = null) + { + return new VectorStoreFileError(code, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The options for the static chunking strategy. + /// A new instance for mocking. + public static VectorStoreStaticChunkingStrategyResponse VectorStoreStaticChunkingStrategyResponse(VectorStoreStaticChunkingStrategyOptions @static = null) + { + return new VectorStoreStaticChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType.Static, serializedAdditionalRawData: null, @static); + } + + /// Initializes a new instance of . + /// The ID of the resource specified for deletion. + /// A value indicating whether deletion was successful. + /// The object type, which is always 'vector_store.deleted'. + /// A new instance for mocking. + public static VectorStoreFileDeletionStatus VectorStoreFileDeletionStatus(string id = null, bool deleted = default, VectorStoreFileDeletionStatusObject @object = default) + { + return new VectorStoreFileDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier, which can be referenced in API endpoints. + /// The object type, which is always `vector_store.file_batch`. + /// The Unix timestamp (in seconds) for when the vector store files batch was created. + /// The ID of the vector store that the file is attached to. + /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. + /// Files count grouped by status processed or being processed by this vector store. + /// A new instance for mocking. + public static VectorStoreFileBatch VectorStoreFileBatch(string id = null, VectorStoreFileBatchObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileBatchStatus status = default, VectorStoreFileCount fileCounts = null) + { + return new VectorStoreFileBatch( + id, + @object, + createdAt, + vectorStoreId, + status, + fileCounts, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier of the message, which can be referenced in API endpoints. + /// The object type, which is always `thread.message.delta`. + /// The delta containing the fields that have changed on the Message. + /// A new instance for mocking. + public static MessageDeltaChunk MessageDeltaChunk(string id = null, MessageDeltaChunkObject @object = default, MessageDelta delta = null) + { + return new MessageDeltaChunk(id, @object, delta, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The entity that produced the message. + /// + /// The content of the message as an array of text and/or images. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static MessageDelta MessageDelta(MessageRole role = default, IEnumerable content = null) + { + content ??= new List(); + + return new MessageDelta(role, content?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the content part of the message. + /// The type of content for this content part. + /// A new instance for mocking. + public static MessageDeltaContent MessageDeltaContent(int index = default, string type = null) + { + return new UnknownMessageDeltaContent(index, type, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the content part of the message. + /// The image_file data. + /// A new instance for mocking. + public static MessageDeltaImageFileContent MessageDeltaImageFileContent(int index = default, MessageDeltaImageFileContentObject imageFile = null) + { + return new MessageDeltaImageFileContent(index, "image_file", serializedAdditionalRawData: null, imageFile); + } + + /// Initializes a new instance of . + /// The file ID of the image in the message content. + /// A new instance for mocking. + public static MessageDeltaImageFileContentObject MessageDeltaImageFileContentObject(string fileId = null) + { + return new MessageDeltaImageFileContentObject(fileId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the content part of the message. + /// The text content details. + /// A new instance for mocking. + public static MessageDeltaTextContent MessageDeltaTextContent(int index = default, MessageDeltaTextContentObject text = null) + { + return new MessageDeltaTextContent(index, "text", serializedAdditionalRawData: null, text); + } + + /// Initializes a new instance of . + /// The data that makes up the text. + /// + /// Annotations for the text. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static MessageDeltaTextContentObject MessageDeltaTextContentObject(string value = null, IEnumerable annotations = null) + { + annotations ??= new List(); + + return new MessageDeltaTextContentObject(value, annotations?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the annotation within a text content part. + /// The type of the text content annotation. + /// A new instance for mocking. + public static MessageDeltaTextAnnotation MessageDeltaTextAnnotation(int index = default, string type = null) + { + return new UnknownMessageDeltaTextAnnotation(index, type, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the annotation within a text content part. + /// The details of the URL citation. + /// The first text index associated with this text annotation. + /// The last text index associated with this text annotation. + /// A new instance for mocking. + public static MessageDeltaTextUrlCitationAnnotation MessageDeltaTextUrlCitationAnnotation(int index = default, MessageDeltaTextUrlCitationDetails urlCitation = null, int? startIndex = null, int? endIndex = null) + { + return new MessageDeltaTextUrlCitationAnnotation( + index, + "url_citation", + serializedAdditionalRawData: null, + urlCitation, + startIndex, + endIndex); + } + + /// Initializes a new instance of . + /// The URL associated with this citation. + /// The title of the URL. + /// A new instance for mocking. + public static MessageDeltaTextUrlCitationDetails MessageDeltaTextUrlCitationDetails(string url = null, string title = null) + { + return new MessageDeltaTextUrlCitationDetails(url, title, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the annotation within a text content part. + /// The file citation information. + /// The text in the message content that needs to be replaced. + /// The start index of this annotation in the content text. + /// The end index of this annotation in the content text. + /// A new instance for mocking. + public static MessageDeltaTextFileCitationAnnotation MessageDeltaTextFileCitationAnnotation(int index = default, MessageDeltaTextFileCitationAnnotationObject fileCitation = null, string text = null, int? startIndex = null, int? endIndex = null) + { + return new MessageDeltaTextFileCitationAnnotation( + index, + "file_citation", + serializedAdditionalRawData: null, + fileCitation, + text, + startIndex, + endIndex); + } + + /// Initializes a new instance of . + /// The ID of the specific file the citation is from. + /// The specific quote in the cited file. + /// A new instance for mocking. + public static MessageDeltaTextFileCitationAnnotationObject MessageDeltaTextFileCitationAnnotationObject(string fileId = null, string quote = null) + { + return new MessageDeltaTextFileCitationAnnotationObject(fileId, quote, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the annotation within a text content part. + /// The file path information. + /// The start index of this annotation in the content text. + /// The end index of this annotation in the content text. + /// The text in the message content that needs to be replaced. + /// A new instance for mocking. + public static MessageDeltaTextFilePathAnnotation MessageDeltaTextFilePathAnnotation(int index = default, MessageDeltaTextFilePathAnnotationObject filePath = null, int? startIndex = null, int? endIndex = null, string text = null) + { + return new MessageDeltaTextFilePathAnnotation( + index, + "file_path", + serializedAdditionalRawData: null, + filePath, + startIndex, + endIndex, + text); + } + + /// Initializes a new instance of . + /// The file ID for the annotation. + /// A new instance for mocking. + public static MessageDeltaTextFilePathAnnotationObject MessageDeltaTextFilePathAnnotationObject(string fileId = null) + { + return new MessageDeltaTextFilePathAnnotationObject(fileId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifier of the run step, which can be referenced in API endpoints. + /// The object type, which is always `thread.run.step.delta`. + /// The delta containing the fields that have changed on the run step. + /// A new instance for mocking. + public static RunStepDeltaChunk RunStepDeltaChunk(string id = null, RunStepDeltaChunkObject @object = default, RunStepDelta delta = null) + { + return new RunStepDeltaChunk(id, @object, delta, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The details of the run step. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static RunStepDelta RunStepDelta(RunStepDeltaDetail stepDetails = null) + { + return new RunStepDelta(stepDetails, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The message creation data. + /// A new instance for mocking. + public static RunStepDeltaMessageCreation RunStepDeltaMessageCreation(RunStepDeltaMessageCreationObject messageCreation = null) + { + return new RunStepDeltaMessageCreation("message_creation", serializedAdditionalRawData: null, messageCreation); + } + + /// Initializes a new instance of . + /// The ID of the newly-created message. + /// A new instance for mocking. + public static RunStepDeltaMessageCreationObject RunStepDeltaMessageCreationObject(string messageId = null) + { + return new RunStepDeltaMessageCreationObject(messageId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The collection of tool calls for the tool call detail item. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static RunStepDeltaToolCallObject RunStepDeltaToolCallObject(IEnumerable toolCalls = null) + { + toolCalls ??= new List(); + + return new RunStepDeltaToolCallObject("tool_calls", serializedAdditionalRawData: null, toolCalls?.ToList()); + } + + /// Initializes a new instance of . + /// The index of the tool call detail in the run step's tool_calls array. + /// The ID of the tool call, used when submitting outputs to the run. + /// The type of the tool call detail item in a streaming run step's details. + /// A new instance for mocking. + public static RunStepDeltaToolCall RunStepDeltaToolCall(int index = default, string id = null, string type = null) + { + return new UnknownRunStepDeltaToolCall(index, id, type, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the tool call detail in the run step's tool_calls array. + /// The ID of the tool call, used when submitting outputs to the run. + /// The function data for the tool call. + /// A new instance for mocking. + public static RunStepDeltaFunctionToolCall RunStepDeltaFunctionToolCall(int index = default, string id = null, RunStepDeltaFunction function = null) + { + return new RunStepDeltaFunctionToolCall(index, id, "function", serializedAdditionalRawData: null, function); + } + + /// Initializes a new instance of . + /// The name of the function. + /// The arguments passed to the function as input. + /// The output of the function, null if outputs have not yet been submitted. + /// A new instance for mocking. + public static RunStepDeltaFunction RunStepDeltaFunction(string name = null, string arguments = null, string output = null) + { + return new RunStepDeltaFunction(name, arguments, output, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the tool call detail in the run step's tool_calls array. + /// The ID of the tool call, used when submitting outputs to the run. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepDeltaFileSearchToolCall RunStepDeltaFileSearchToolCall(int index = default, string id = null, RunStepFileSearchToolCallResults fileSearch = null) + { + return new RunStepDeltaFileSearchToolCall(index, id, "file_search", serializedAdditionalRawData: null, fileSearch); + } + + /// Initializes a new instance of . + /// The index of the tool call detail in the run step's tool_calls array. + /// The ID of the tool call, used when submitting outputs to the run. + /// The Code Interpreter data for the tool call. + /// A new instance for mocking. + public static RunStepDeltaCodeInterpreterToolCall RunStepDeltaCodeInterpreterToolCall(int index = default, string id = null, RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter = null) + { + return new RunStepDeltaCodeInterpreterToolCall(index, id, "code_interpreter", serializedAdditionalRawData: null, codeInterpreter); + } + + /// Initializes a new instance of . + /// The input into the Code Interpreter tool call. + /// + /// The outputs from the Code Interpreter tool call. Code Interpreter can output one or more + /// items, including text (`logs`) or images (`image`). Each of these are represented by a + /// different object type. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static RunStepDeltaCodeInterpreterDetailItemObject RunStepDeltaCodeInterpreterDetailItemObject(string input = null, IEnumerable outputs = null) + { + outputs ??= new List(); + + return new RunStepDeltaCodeInterpreterDetailItemObject(input, outputs?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. + /// The type of the streaming run step tool call's Code Interpreter output. + /// A new instance for mocking. + public static RunStepDeltaCodeInterpreterOutput RunStepDeltaCodeInterpreterOutput(int index = default, string type = null) + { + return new UnknownRunStepDeltaCodeInterpreterOutput(index, type, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. + /// The text output from the Code Interpreter tool call. + /// A new instance for mocking. + public static RunStepDeltaCodeInterpreterLogOutput RunStepDeltaCodeInterpreterLogOutput(int index = default, string logs = null) + { + return new RunStepDeltaCodeInterpreterLogOutput(index, "logs", serializedAdditionalRawData: null, logs); + } + + /// Initializes a new instance of . + /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. + /// The image data for the Code Interpreter tool call output. + /// A new instance for mocking. + public static RunStepDeltaCodeInterpreterImageOutput RunStepDeltaCodeInterpreterImageOutput(int index = default, RunStepDeltaCodeInterpreterImageOutputObject image = null) + { + return new RunStepDeltaCodeInterpreterImageOutput(index, "image", serializedAdditionalRawData: null, image); + } + + /// Initializes a new instance of . + /// The file ID for the image. + /// A new instance for mocking. + public static RunStepDeltaCodeInterpreterImageOutputObject RunStepDeltaCodeInterpreterImageOutputObject(string fileId = null) + { + return new RunStepDeltaCodeInterpreterImageOutputObject(fileId, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/Agent.Serialization.cs index 222f3d70f61e..7d04c6f30f2f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class Agent : IUtf8JsonSerializable, IJsonModel { @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); + writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); if (Name != null) @@ -175,7 +175,7 @@ internal static Agent DeserializeAgent(JsonElement element, ModelReaderWriterOpt return null; } string id = default; - string @object = default; + AgentObject @object = default; DateTimeOffset createdAt = default; string name = default; string description = default; @@ -198,7 +198,7 @@ internal static Agent DeserializeAgent(JsonElement element, ModelReaderWriterOpt } if (property.NameEquals("object"u8)) { - @object = property.Value.GetString(); + @object = new AgentObject(property.Value.GetString()); continue; } if (property.NameEquals("created_at"u8)) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.cs similarity index 96% rename from sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/Agent.cs index 8d1ff839899f..faa18b10044e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents an agent that can call the model and use tools. public partial class Agent @@ -123,7 +123,7 @@ internal Agent(string id, DateTimeOffset createdAt, string name, string descript /// The response format of the tool calls used by this agent. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Keeps track of any properties unknown to the library. - internal Agent(string id, string @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IReadOnlyList tools, ToolResources toolResources, float? temperature, float? topP, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal Agent(string id, AgentObject @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IReadOnlyList tools, ToolResources toolResources, float? temperature, float? topP, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) { Id = id; Object = @object; @@ -148,6 +148,8 @@ internal Agent() /// The identifier, which can be referenced in API endpoints. public string Id { get; } + /// The object type, which is always assistant. + public AgentObject Object { get; } = AgentObject.Assistant; /// The Unix timestamp, in seconds, representing when this object was created. public DateTimeOffset CreatedAt { get; } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AgentObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentObject.cs new file mode 100644 index 000000000000..846c2bb0ff6d --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The Agent_object. + public readonly partial struct AgentObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AgentObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AssistantValue = "assistant"; + + /// assistant. + public static AgentObject Assistant { get; } = new AgentObject(AssistantValue); + /// Determines if two values are the same. + public static bool operator ==(AgentObject left, AgentObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AgentObject left, AgentObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AgentObject(string value) => new AgentObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AgentObject other && Equals(other); + /// + public bool Equals(AgentObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentStreamEvent.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentStreamEvent.cs index 97c4efa2a29e..e87fb6d5c615 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentStreamEvent.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// Each event in a server-sent events stream has an `event` and `data` property: diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.Serialization.cs index a1c1a2f68206..c1d03ed54e7e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AgentThread : IUtf8JsonSerializable, IJsonModel { @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); + writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); if (ToolResources != null) @@ -102,7 +102,7 @@ internal static AgentThread DeserializeAgentThread(JsonElement element, ModelRea return null; } string id = default; - string @object = default; + AgentThreadObject @object = default; DateTimeOffset createdAt = default; ToolResources toolResources = default; IReadOnlyDictionary metadata = default; @@ -117,7 +117,7 @@ internal static AgentThread DeserializeAgentThread(JsonElement element, ModelRea } if (property.NameEquals("object"u8)) { - @object = property.Value.GetString(); + @object = new AgentThreadObject(property.Value.GetString()); continue; } if (property.NameEquals("created_at"u8)) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.cs similarity index 93% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.cs index 3d11c01c11fd..7aa8bfe05bc7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Information about a single thread associated with an agent. public partial class AgentThread @@ -76,7 +76,7 @@ internal AgentThread(string id, DateTimeOffset createdAt, ToolResources toolReso /// /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Keeps track of any properties unknown to the library. - internal AgentThread(string id, string @object, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal AgentThread(string id, AgentThreadObject @object, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) { Id = id; Object = @object; @@ -93,6 +93,8 @@ internal AgentThread() /// The identifier, which can be referenced in API endpoints. public string Id { get; } + /// The object type, which is always 'thread'. + public AgentThreadObject Object { get; } = AgentThreadObject.Thread; /// The Unix timestamp, in seconds, representing when this object was created. public DateTimeOffset CreatedAt { get; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.Serialization.cs index 54eb2a8cee49..874b03c46562 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AgentThreadCreationOptions : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.cs index 384b24441047..2587839ac4b0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The details used to create a new agent thread. public partial class AgentThreadCreationOptions diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadObject.cs new file mode 100644 index 000000000000..1d4ab5bf287d --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The AgentThread_object. + public readonly partial struct AgentThreadObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AgentThreadObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ThreadValue = "thread"; + + /// thread. + public static AgentThreadObject Thread { get; } = new AgentThreadObject(ThreadValue); + /// Determines if two values are the same. + public static bool operator ==(AgentThreadObject left, AgentThreadObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AgentThreadObject left, AgentThreadObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AgentThreadObject(string value) => new AgentThreadObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AgentThreadObject other && Equals(other); + /// + public bool Equals(AgentThreadObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.Serialization.cs index dcf23c64e9f5..413ea488968a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AgentsApiResponseFormat : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.cs index b481792951e0..cfe48a8edf37 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormatMode.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormatMode.cs index 283e0295f37b..b53b9ea34482 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormatMode.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the mode in which the model will handle the return format of a tool call. public readonly partial struct AgentsApiResponseFormatMode : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiToolChoiceOptionMode.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiToolChoiceOptionMode.cs index 7f7f9ab114ea..fbf051fcb64a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiToolChoiceOptionMode.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Specifies how the tool choice will be used. public readonly partial struct AgentsApiToolChoiceOptionMode : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClient.cs similarity index 92% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsClient.cs index 56679b3d00d5..6e1196ecaecc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClient.cs @@ -14,10 +14,10 @@ using Azure.Core; using Azure.Core.Pipeline; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - // Data plane generated sub-client. - /// The Agents sub-client. + // Data plane generated client. + /// The Agents service client. public partial class AgentsClient { private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com/.default" }; @@ -41,24 +41,43 @@ protected AgentsClient() } /// Initializes a new instance of AgentsClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The token credential to copy. /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. /// The Azure subscription ID. /// The name of the Azure Resource Group. /// The Azure AI Foundry project name. - /// The API version to use for this operation. - internal AgentsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, string apiVersion) + /// A credential used to authenticate to an Azure Service. + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public AgentsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential) : this(endpoint, subscriptionId, resourceGroupName, projectName, credential, new AgentsClientOptions()) { - ClientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - _tokenCredential = tokenCredential; + } + + /// Initializes a new instance of AgentsClient. + /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. + /// The Azure subscription ID. + /// The name of the Azure Resource Group. + /// The Azure AI Foundry project name. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// , , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public AgentsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential, AgentsClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AgentsClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); _endpoint = endpoint; _subscriptionId = subscriptionId; _resourceGroupName = resourceGroupName; _projectName = projectName; - _apiVersion = apiVersion; + _apiVersion = options.Version; } /// Creates a new agent. @@ -233,11 +252,11 @@ public virtual Response CreateAgent(RequestContent content, RequestContext conte /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. /// The cancellation token to use. - internal virtual async Task> InternalGetAgentsAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual async Task> InternalGetAgentsAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); Response response = await InternalGetAgentsAsync(limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfAgent.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfAgent.FromResponse(response), response); } /// Gets a list of agents that were previously created. @@ -246,11 +265,11 @@ internal virtual async Task> Interna /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. /// The cancellation token to use. - internal virtual Response InternalGetAgents(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual Response InternalGetAgents(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); Response response = InternalGetAgents(limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfAgent.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfAgent.FromResponse(response), response); } /// @@ -330,30 +349,30 @@ internal virtual Response InternalGetAgents(int? limit, string order, string aft } /// Retrieves an existing agent. - /// Identifier of the agent. + /// Identifier of the agent. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetAgentAsync(string assistantId, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAgentAsync(string agentId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetAgentAsync(assistantId, context).ConfigureAwait(false); + Response response = await GetAgentAsync(agentId, context).ConfigureAwait(false); return Response.FromValue(Agent.FromResponse(response), response); } /// Retrieves an existing agent. - /// Identifier of the agent. + /// Identifier of the agent. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetAgent(string assistantId, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response GetAgent(string agentId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetAgent(assistantId, context); + Response response = GetAgent(agentId, context); return Response.FromValue(Agent.FromResponse(response), response); } @@ -372,21 +391,21 @@ public virtual Response GetAgent(string assistantId, CancellationToken ca /// /// /// - /// Identifier of the agent. + /// Identifier of the agent. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task GetAgentAsync(string assistantId, RequestContext context) + public virtual async Task GetAgentAsync(string agentId, RequestContext context) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetAgent"); scope.Start(); try { - using HttpMessage message = CreateGetAgentRequest(assistantId, context); + using HttpMessage message = CreateGetAgentRequest(agentId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -411,21 +430,21 @@ public virtual async Task GetAgentAsync(string assistantId, RequestCon /// /// /// - /// Identifier of the agent. + /// Identifier of the agent. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - public virtual Response GetAgent(string assistantId, RequestContext context) + public virtual Response GetAgent(string agentId, RequestContext context) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetAgent"); scope.Start(); try { - using HttpMessage message = CreateGetAgentRequest(assistantId, context); + using HttpMessage message = CreateGetAgentRequest(agentId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -436,7 +455,7 @@ public virtual Response GetAgent(string assistantId, RequestContext context) } /// Modifies an existing agent. - /// The ID of the agent to modify. + /// The ID of the agent to modify. /// The ID of the model to use. /// The modified name for the agent to use. /// The modified description for the agent to use. @@ -459,11 +478,11 @@ public virtual Response GetAgent(string assistantId, RequestContext context) /// The response format of the tool calls used by this agent. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> UpdateAgentAsync(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> UpdateAgentAsync(string agentId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); UpdateAgentRequest updateAgentRequest = new UpdateAgentRequest( model, @@ -478,12 +497,12 @@ public virtual async Task> UpdateAgentAsync(string assistantId, metadata ?? new ChangeTrackingDictionary(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateAgentAsync(assistantId, updateAgentRequest.ToRequestContent(), context).ConfigureAwait(false); + Response response = await UpdateAgentAsync(agentId, updateAgentRequest.ToRequestContent(), context).ConfigureAwait(false); return Response.FromValue(Agent.FromResponse(response), response); } /// Modifies an existing agent. - /// The ID of the agent to modify. + /// The ID of the agent to modify. /// The ID of the model to use. /// The modified name for the agent to use. /// The modified description for the agent to use. @@ -506,11 +525,11 @@ public virtual async Task> UpdateAgentAsync(string assistantId, /// The response format of the tool calls used by this agent. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response UpdateAgent(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response UpdateAgent(string agentId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); UpdateAgentRequest updateAgentRequest = new UpdateAgentRequest( model, @@ -525,7 +544,7 @@ public virtual Response UpdateAgent(string assistantId, string model = nu metadata ?? new ChangeTrackingDictionary(), null); RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateAgent(assistantId, updateAgentRequest.ToRequestContent(), context); + Response response = UpdateAgent(agentId, updateAgentRequest.ToRequestContent(), context); return Response.FromValue(Agent.FromResponse(response), response); } @@ -544,23 +563,23 @@ public virtual Response UpdateAgent(string assistantId, string model = nu /// /// /// - /// The ID of the agent to modify. + /// The ID of the agent to modify. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task UpdateAgentAsync(string assistantId, RequestContent content, RequestContext context = null) + public virtual async Task UpdateAgentAsync(string agentId, RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); Argument.AssertNotNull(content, nameof(content)); using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateAgent"); scope.Start(); try { - using HttpMessage message = CreateUpdateAgentRequest(assistantId, content, context); + using HttpMessage message = CreateUpdateAgentRequest(agentId, content, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -585,23 +604,23 @@ public virtual async Task UpdateAgentAsync(string assistantId, Request /// /// /// - /// The ID of the agent to modify. + /// The ID of the agent to modify. /// The content to send as the body of the request. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - public virtual Response UpdateAgent(string assistantId, RequestContent content, RequestContext context = null) + public virtual Response UpdateAgent(string agentId, RequestContent content, RequestContext context = null) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); Argument.AssertNotNull(content, nameof(content)); using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateAgent"); scope.Start(); try { - using HttpMessage message = CreateUpdateAgentRequest(assistantId, content, context); + using HttpMessage message = CreateUpdateAgentRequest(agentId, content, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -612,30 +631,30 @@ public virtual Response UpdateAgent(string assistantId, RequestContent content, } /// Deletes an agent. - /// Identifier of the agent. + /// Identifier of the agent. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalDeleteAgentAsync(string assistantId, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + internal virtual async Task> InternalDeleteAgentAsync(string agentId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalDeleteAgentAsync(assistantId, context).ConfigureAwait(false); + Response response = await InternalDeleteAgentAsync(agentId, context).ConfigureAwait(false); return Response.FromValue(InternalAgentDeletionStatus.FromResponse(response), response); } /// Deletes an agent. - /// Identifier of the agent. + /// Identifier of the agent. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalDeleteAgent(string assistantId, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + internal virtual Response InternalDeleteAgent(string agentId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalDeleteAgent(assistantId, context); + Response response = InternalDeleteAgent(agentId, context); return Response.FromValue(InternalAgentDeletionStatus.FromResponse(response), response); } @@ -654,21 +673,21 @@ internal virtual Response InternalDeleteAgent(strin /// /// /// - /// Identifier of the agent. + /// Identifier of the agent. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task InternalDeleteAgentAsync(string assistantId, RequestContext context) + internal virtual async Task InternalDeleteAgentAsync(string agentId, RequestContext context) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteAgent"); scope.Start(); try { - using HttpMessage message = CreateInternalDeleteAgentRequest(assistantId, context); + using HttpMessage message = CreateInternalDeleteAgentRequest(agentId, context); return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); } catch (Exception e) @@ -693,21 +712,21 @@ internal virtual async Task InternalDeleteAgentAsync(string assistantI /// /// /// - /// Identifier of the agent. + /// Identifier of the agent. /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual Response InternalDeleteAgent(string assistantId, RequestContext context) + internal virtual Response InternalDeleteAgent(string agentId, RequestContext context) { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); + Argument.AssertNotNullOrEmpty(agentId, nameof(agentId)); using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteAgent"); scope.Start(); try { - using HttpMessage message = CreateInternalDeleteAgentRequest(assistantId, context); + using HttpMessage message = CreateInternalDeleteAgentRequest(agentId, context); return _pipeline.ProcessMessage(message, context); } catch (Exception e) @@ -1315,13 +1334,13 @@ public virtual Response CreateMessage(string threadId, RequestContent content, R /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalGetMessagesAsync(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual async Task> InternalGetMessagesAsync(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = await InternalGetMessagesAsync(threadId, runId, limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfThreadMessage.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfThreadMessage.FromResponse(response), response); } /// Gets a list of messages that exist on a thread. @@ -1334,13 +1353,13 @@ internal virtual async Task> /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalGetMessages(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual Response InternalGetMessages(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = InternalGetMessages(threadId, runId, limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfThreadMessage.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfThreadMessage.FromResponse(response), response); } /// @@ -1669,7 +1688,7 @@ public virtual Response UpdateMessage(string threadId, string messageId, Request /// Creates a new run for an agent thread. /// Identifier of the thread. - /// The ID of the agent that should run the thread. + /// The ID of the agent that should run the thread. /// The overridden model name that the agent should use to run the thread. /// The overridden system instructions that the agent should use to run the thread. /// @@ -1713,15 +1732,15 @@ public virtual Response UpdateMessage(string threadId, string messageId, Request /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. /// /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) + public virtual async Task> CreateRunAsync(string threadId, string agentId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); CreateRunRequest createRunRequest = new CreateRunRequest( - assistantId, + agentId, overrideModelName, overrideInstructions, additionalInstructions, @@ -1745,7 +1764,7 @@ public virtual async Task> CreateRunAsync(string threadId, s /// Creates a new run for an agent thread. /// Identifier of the thread. - /// The ID of the agent that should run the thread. + /// The ID of the agent that should run the thread. /// The overridden model name that the agent should use to run the thread. /// The overridden system instructions that the agent should use to run the thread. /// @@ -1789,15 +1808,15 @@ public virtual async Task> CreateRunAsync(string threadId, s /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. /// /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. - public virtual Response CreateRun(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) + public virtual Response CreateRun(string threadId, string agentId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); CreateRunRequest createRunRequest = new CreateRunRequest( - assistantId, + agentId, overrideModelName, overrideInstructions, additionalInstructions, @@ -1918,13 +1937,13 @@ public virtual Response CreateRun(string threadId, RequestContent content, IEnum /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalGetRunsAsync(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual async Task> InternalGetRunsAsync(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = await InternalGetRunsAsync(threadId, limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfThreadRun.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfThreadRun.FromResponse(response), response); } /// Gets a list of runs for a specified thread. @@ -1936,13 +1955,13 @@ internal virtual async Task> Int /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalGetRuns(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual Response InternalGetRuns(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = InternalGetRuns(threadId, limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfThreadRun.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfThreadRun.FromResponse(response), response); } /// @@ -2267,6 +2286,132 @@ public virtual Response UpdateRun(string threadId, string runId, RequestContent } } + /// Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. + /// Identifier of the thread. + /// Identifier of the run. + /// A list of tools for which the outputs are being submitted. + /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public virtual async Task> SubmitToolOutputsToRunAsync(string threadId, string runId, IEnumerable toolOutputs, bool? stream = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); + + SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new SubmitToolOutputsToRunRequest(toolOutputs.ToList(), stream, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await SubmitToolOutputsToRunAsync(threadId, runId, submitToolOutputsToRunRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(ThreadRun.FromResponse(response), response); + } + + /// Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. + /// Identifier of the thread. + /// Identifier of the run. + /// A list of tools for which the outputs are being submitted. + /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public virtual Response SubmitToolOutputsToRun(string threadId, string runId, IEnumerable toolOutputs, bool? stream = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); + + SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new SubmitToolOutputsToRunRequest(toolOutputs.ToList(), stream, null); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = SubmitToolOutputsToRun(threadId, runId, submitToolOutputsToRunRequest.ToRequestContent(), context); + return Response.FromValue(ThreadRun.FromResponse(response), response); + } + + /// + /// [Protocol Method] Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier of the thread. + /// Identifier of the run. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task SubmitToolOutputsToRunAsync(string threadId, string runId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AgentsClient.SubmitToolOutputsToRun"); + scope.Start(); + try + { + using HttpMessage message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier of the thread. + /// Identifier of the run. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual Response SubmitToolOutputsToRun(string threadId, string runId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); + Argument.AssertNotNullOrEmpty(runId, nameof(runId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AgentsClient.SubmitToolOutputsToRun"); + scope.Start(); + try + { + using HttpMessage message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// Cancels a run of an in progress thread. /// Identifier of the thread. /// Identifier of the run. @@ -2382,7 +2527,7 @@ public virtual Response CancelRun(string threadId, string runId, RequestContext } /// Creates a new agent thread and immediately starts a run using that new thread. - /// The ID of the agent for which the thread should be created. + /// The ID of the agent for which the thread should be created. /// The details used to create the new thread. If no thread is provided, an empty one will be created. /// The overridden model that the agent should use to run the thread. /// The overridden system instructions the agent should use to run the thread. @@ -2419,13 +2564,13 @@ public virtual Response CancelRun(string threadId, string runId, RequestContext /// If `true` functions will run in parallel during tool use. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual async Task> CreateThreadAndRunAsync(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> CreateThreadAndRunAsync(string agentId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); CreateThreadAndRunRequest createThreadAndRunRequest = new CreateThreadAndRunRequest( - assistantId, + agentId, thread, overrideModelName, overrideInstructions, @@ -2448,7 +2593,7 @@ public virtual async Task> CreateThreadAndRunAsync(string as } /// Creates a new agent thread and immediately starts a run using that new thread. - /// The ID of the agent for which the thread should be created. + /// The ID of the agent for which the thread should be created. /// The details used to create the new thread. If no thread is provided, an empty one will be created. /// The overridden model that the agent should use to run the thread. /// The overridden system instructions the agent should use to run the thread. @@ -2485,13 +2630,13 @@ public virtual async Task> CreateThreadAndRunAsync(string as /// If `true` functions will run in parallel during tool use. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. - /// is null. - public virtual Response CreateThreadAndRun(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + /// is null. + public virtual Response CreateThreadAndRun(string agentId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); CreateThreadAndRunRequest createThreadAndRunRequest = new CreateThreadAndRunRequest( - assistantId, + agentId, thread, overrideModelName, overrideInstructions, @@ -2741,14 +2886,14 @@ public virtual Response GetRunStep(string threadId, string runId, string stepId, /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalGetRunStepsAsync(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual async Task> InternalGetRunStepsAsync(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = await InternalGetRunStepsAsync(threadId, runId, include, limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfRunStep.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfRunStep.FromResponse(response), response); } /// Gets a list of run steps from a thread run. @@ -2765,14 +2910,14 @@ internal virtual async Task> Inter /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - internal virtual Response InternalGetRunSteps(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + internal virtual Response InternalGetRunSteps(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); Argument.AssertNotNullOrEmpty(runId, nameof(runId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = InternalGetRunSteps(threadId, runId, include, limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfRunStep.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfRunStep.FromResponse(response), response); } /// @@ -2876,7 +3021,7 @@ internal virtual Response InternalGetRunSteps(string threadId, string runId, IEn /// Gets a list of previously uploaded files. /// The purpose of the file. /// The cancellation token to use. - internal virtual async Task> InternalListFilesAsync(AgentFilePurpose? purpose = null, CancellationToken cancellationToken = default) + internal virtual async Task> InternalListFilesAsync(OpenAIFilePurpose? purpose = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); Response response = await InternalListFilesAsync(purpose?.ToString(), context).ConfigureAwait(false); @@ -2886,7 +3031,7 @@ internal virtual async Task> InternalListFile /// Gets a list of previously uploaded files. /// The purpose of the file. /// The cancellation token to use. - internal virtual Response InternalListFiles(AgentFilePurpose? purpose = null, CancellationToken cancellationToken = default) + internal virtual Response InternalListFiles(OpenAIFilePurpose? purpose = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); Response response = InternalListFiles(purpose?.ToString(), context); @@ -2903,7 +3048,7 @@ internal virtual Response InternalListFiles(AgentFileP /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2938,7 +3083,7 @@ internal virtual async Task InternalListFilesAsync(string purpose, Req /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -2963,6 +3108,40 @@ internal virtual Response InternalListFiles(string purpose, RequestContext conte } } + /// Uploads a file for use by other operations. + /// The file data, in bytes. + /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. + /// The name of the file. + /// The cancellation token to use. + /// is null. + public virtual async Task> UploadFileAsync(Stream data, OpenAIFilePurpose purpose, string filename = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + UploadFileRequest uploadFileRequest = new UploadFileRequest(data, purpose, filename, null); + using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await UploadFileAsync(content, content.ContentType, context).ConfigureAwait(false); + return Response.FromValue(OpenAIFile.FromResponse(response), response); + } + + /// Uploads a file for use by other operations. + /// The file data, in bytes. + /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. + /// The name of the file. + /// The cancellation token to use. + /// is null. + public virtual Response UploadFile(Stream data, OpenAIFilePurpose purpose, string filename = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + UploadFileRequest uploadFileRequest = new UploadFileRequest(data, purpose, filename, null); + using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = UploadFile(content, content.ContentType, context); + return Response.FromValue(OpenAIFile.FromResponse(response), response); + } + /// /// [Protocol Method] Uploads a file for use by other operations. /// @@ -2973,7 +3152,7 @@ internal virtual Response InternalListFiles(string purpose, RequestContext conte /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -3012,7 +3191,7 @@ public virtual async Task UploadFileAsync(RequestContent content, stri /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -3152,13 +3331,13 @@ internal virtual Response InternalDeleteFile(string fileId, RequestContext conte /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetFileAsync(string fileId, CancellationToken cancellationToken = default) + public virtual async Task> GetFileAsync(string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = await GetFileAsync(fileId, context).ConfigureAwait(false); - return Response.FromValue(AgentFile.FromResponse(response), response); + return Response.FromValue(OpenAIFile.FromResponse(response), response); } /// Returns information about a specific file. Does not retrieve file content. @@ -3166,13 +3345,13 @@ public virtual async Task> GetFileAsync(string fileId, Cance /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public virtual Response GetFile(string fileId, CancellationToken cancellationToken = default) + public virtual Response GetFile(string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = GetFile(fileId, context); - return Response.FromValue(AgentFile.FromResponse(response), response); + return Response.FromValue(OpenAIFile.FromResponse(response), response); } /// @@ -3365,11 +3544,11 @@ public virtual Response GetFileContent(string fileId, RequestContext context) /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. /// The cancellation token to use. - public virtual async Task> GetVectorStoresAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + public virtual async Task> GetVectorStoresAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); Response response = await GetVectorStoresAsync(limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(AgentPageableListOfVectorStore.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfVectorStore.FromResponse(response), response); } /// Returns a list of vector stores. @@ -3378,11 +3557,11 @@ public virtual async Task> GetVectorSto /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. /// The cancellation token to use. - public virtual Response GetVectorStores(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + public virtual Response GetVectorStores(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); Response response = GetVectorStores(limit, order?.ToString(), after, before, context); - return Response.FromValue(AgentPageableListOfVectorStore.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfVectorStore.FromResponse(response), response); } /// @@ -3923,13 +4102,13 @@ public virtual Response DeleteVectorStore(string vectorStoreId, RequestContext c /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetVectorStoreFilesAsync(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + public virtual async Task> GetVectorStoreFilesAsync(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = await GetVectorStoreFilesAsync(vectorStoreId, filter?.ToString(), limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response); } /// Returns a list of vector store files. @@ -3942,13 +4121,13 @@ public virtual async Task> GetVecto /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public virtual Response GetVectorStoreFiles(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + public virtual Response GetVectorStoreFiles(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = GetVectorStoreFiles(vectorStoreId, filter?.ToString(), limit, order?.ToString(), after, before, context); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response); } /// @@ -4750,14 +4929,14 @@ public virtual Response CancelVectorStoreFileBatch(string vectorStoreId, string /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public virtual async Task> GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + public virtual async Task> GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = await GetVectorStoreFileBatchFilesAsync(vectorStoreId, batchId, filter?.ToString(), limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response); } /// Returns a list of vector store files in a batch. @@ -4771,14 +4950,14 @@ public virtual async Task> GetVecto /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. - public virtual Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) + public virtual Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); RequestContext context = FromCancellationToken(cancellationToken); Response response = GetVectorStoreFileBatchFiles(vectorStoreId, batchId, filter?.ToString(), limit, order?.ToString(), after, before, context); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); + return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response); } /// @@ -4931,7 +5110,7 @@ internal HttpMessage CreateInternalGetAgentsRequest(int? limit, string order, st return message; } - internal HttpMessage CreateGetAgentRequest(string assistantId, RequestContext context) + internal HttpMessage CreateGetAgentRequest(string agentId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -4945,14 +5124,14 @@ internal HttpMessage CreateGetAgentRequest(string assistantId, RequestContext co uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendRaw(_projectName, true); uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); + uri.AppendPath(agentId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); return message; } - internal HttpMessage CreateUpdateAgentRequest(string assistantId, RequestContent content, RequestContext context) + internal HttpMessage CreateUpdateAgentRequest(string agentId, RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -4966,7 +5145,7 @@ internal HttpMessage CreateUpdateAgentRequest(string assistantId, RequestContent uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendRaw(_projectName, true); uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); + uri.AppendPath(agentId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -4975,7 +5154,7 @@ internal HttpMessage CreateUpdateAgentRequest(string assistantId, RequestContent return message; } - internal HttpMessage CreateInternalDeleteAgentRequest(string assistantId, RequestContext context) + internal HttpMessage CreateInternalDeleteAgentRequest(string agentId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); var request = message.Request; @@ -4989,7 +5168,7 @@ internal HttpMessage CreateInternalDeleteAgentRequest(string assistantId, Reques uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendRaw(_projectName, true); uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); + uri.AppendPath(agentId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClientOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClientOptions.cs new file mode 100644 index 000000000000..7f8bc2d4fcc1 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.Agents +{ + /// Client options for AgentsClient. + public partial class AgentsClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_07_01_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2024-07-01-preview". + V2024_07_01_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of AgentsClientOptions. + public AgentsClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2024_07_01_Preview => "2024-07-01-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.Serialization.cs index eb2199b05975..6e6452c5c24c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AgentsNamedToolChoice : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.cs index eb7476192154..7b5b26278848 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Specifies a tool the model should use. Use to force the model to call a specific tool. public partial class AgentsNamedToolChoice diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoiceType.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoiceType.cs index e9371e9da058..25709be98bee 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoiceType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Available tool types for agents named tools. public readonly partial struct AgentsNamedToolChoiceType : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.Serialization.cs index afce3c218073..cb9afc4a50af 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AzureAISearchResource : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.cs index 2aaaf6746d8b..d5b6d2c0d6c9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A set of index resources used by the `azure_ai_search` tool. public partial class AzureAISearchResource diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.Serialization.cs index b2b505a64fe7..e30db4408312 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AzureAISearchToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.cs index b8e95d87f7ab..dbac18de08be 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for an Azure AI search tool as used to configure an agent. public partial class AzureAISearchToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.Serialization.cs index a4debebae798..29e412693003 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AzureFunctionBinding : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.cs index 86898f39d812..a8d55f18b6f5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The structure for keeping storage queue name and URI. public partial class AzureFunctionBinding diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBindingType.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBindingType.cs index d3ef7652d782..1370c801a02f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBindingType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The AzureFunctionBinding_type. public readonly partial struct AzureFunctionBindingType : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.Serialization.cs index 1965136e4c3d..d917d4de463d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AzureFunctionStorageQueue : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.cs index 1782ede5ac86..0a6ae379e832 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The structure for keeping storage queue name and URI. public partial class AzureFunctionStorageQueue diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.Serialization.cs index 2e12aa340633..3c380c9e3bf0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class AzureFunctionToolDefinition : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azure_function"u8); - writer.WriteObjectValue(InternalAzureFunction, options); + writer.WriteObjectValue(InternalAzureFunction, options); } AzureFunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.cs similarity index 59% rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.cs index 87032b76e501..2e42b31a73f6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.cs @@ -8,11 +8,22 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a azure function tool as used to configure an agent. public partial class AzureFunctionToolDefinition : ToolDefinition { + /// Initializes a new instance of . + /// The definition of the concrete function that the function tool should call. + /// is null. + public AzureFunctionToolDefinition(InternalAzureFunctionDefinition internalAzureFunction) + { + Argument.AssertNotNull(internalAzureFunction, nameof(internalAzureFunction)); + + Type = "azure_function"; + InternalAzureFunction = internalAzureFunction; + } + /// Initializes a new instance of . /// The object type. /// Keeps track of any properties unknown to the library. @@ -26,5 +37,8 @@ internal AzureFunctionToolDefinition(string type, IDictionary The definition of the concrete function that the function tool should call. + public InternalAzureFunctionDefinition InternalAzureFunction { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.Serialization.cs index d606a9591dd4..f96c5a442729 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class BingGroundingToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.cs index a43df24739de..c5be1cd1ee1d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a bing grounding search tool as used to configure an agent. public partial class BingGroundingToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.Serialization.cs index 005189ea069f..9092f4a6841e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class CodeInterpreterToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.cs index fbcc0b2aa891..f920b6fea97e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a code interpreter tool as used to configure an agent. public partial class CodeInterpreterToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.Serialization.cs index fe0ccc4770ad..5458cc1a03a7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class CodeInterpreterToolResource : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.cs index 5eebfab8f085..53cf33a337ff 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A set of resources that are used by the `code_interpreter` tool. public partial class CodeInterpreterToolResource diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.Serialization.cs index bd26d118a0d1..616e1cfbd3f0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateAgentRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.cs index 9dda204238ad..75179a4c0f8a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateAgentRequest. internal partial class CreateAgentRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.Serialization.cs index e7b65a214b4d..7b1b4054e06b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateMessageRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.cs index 06f70fecdb8a..7f7a7722ec7a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateMessageRequest. internal partial class CreateMessageRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.Serialization.cs index bde5271e3de4..7defc2e238be 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateRunRequest : IUtf8JsonSerializable, IJsonModel { @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WriteStringValue(AgentId); if (Optional.IsDefined(OverrideModelName)) { if (OverrideModelName != null) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.cs similarity index 93% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.cs index 9b9969dd27eb..1c9cc007fbf1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateRunRequest. internal partial class CreateRunRequest @@ -46,20 +46,20 @@ internal partial class CreateRunRequest private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The ID of the agent that should run the thread. - /// is null. - internal CreateRunRequest(string assistantId) + /// The ID of the agent that should run the thread. + /// is null. + internal CreateRunRequest(string agentId) { - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); - AssistantId = assistantId; + AgentId = agentId; AdditionalMessages = new ChangeTrackingList(); OverrideTools = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// The ID of the agent that should run the thread. + /// The ID of the agent that should run the thread. /// The overridden model name that the agent should use to run the thread. /// The overridden system instructions that the agent should use to run the thread. /// @@ -103,9 +103,9 @@ internal CreateRunRequest(string assistantId) /// If `true` functions will run in parallel during tool use. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Keeps track of any properties unknown to the library. - internal CreateRunRequest(string assistantId, string overrideModelName, string overrideInstructions, string additionalInstructions, IReadOnlyList additionalMessages, IReadOnlyList overrideTools, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal CreateRunRequest(string agentId, string overrideModelName, string overrideInstructions, string additionalInstructions, IReadOnlyList additionalMessages, IReadOnlyList overrideTools, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) { - AssistantId = assistantId; + AgentId = agentId; OverrideModelName = overrideModelName; OverrideInstructions = overrideInstructions; AdditionalInstructions = additionalInstructions; @@ -130,7 +130,7 @@ internal CreateRunRequest() } /// The ID of the agent that should run the thread. - public string AssistantId { get; } + public string AgentId { get; } /// The overridden model name that the agent should use to run the thread. public string OverrideModelName { get; } /// The overridden system instructions that the agent should use to run the thread. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.Serialization.cs index 0af226f2493c..094386920567 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateThreadAndRunRequest : IUtf8JsonSerializable, IJsonModel { @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WriteStringValue(AgentId); if (Optional.IsDefined(Thread)) { writer.WritePropertyName("thread"u8); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.cs similarity index 93% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.cs index 58bc40b50d21..bb52a5aa8881 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateThreadAndRunRequest. internal partial class CreateThreadAndRunRequest @@ -46,19 +46,19 @@ internal partial class CreateThreadAndRunRequest private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The ID of the agent for which the thread should be created. - /// is null. - internal CreateThreadAndRunRequest(string assistantId) + /// The ID of the agent for which the thread should be created. + /// is null. + internal CreateThreadAndRunRequest(string agentId) { - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); - AssistantId = assistantId; + AgentId = agentId; OverrideTools = new ChangeTrackingList(); Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// The ID of the agent for which the thread should be created. + /// The ID of the agent for which the thread should be created. /// The details used to create the new thread. If no thread is provided, an empty one will be created. /// The overridden model that the agent should use to run the thread. /// The overridden system instructions the agent should use to run the thread. @@ -99,9 +99,9 @@ internal CreateThreadAndRunRequest(string assistantId) /// If `true` functions will run in parallel during tool use. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Keeps track of any properties unknown to the library. - internal CreateThreadAndRunRequest(string assistantId, AgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal CreateThreadAndRunRequest(string agentId, AgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) { - AssistantId = assistantId; + AgentId = agentId; Thread = thread; OverrideModelName = overrideModelName; OverrideInstructions = overrideInstructions; @@ -126,7 +126,7 @@ internal CreateThreadAndRunRequest() } /// The ID of the agent for which the thread should be created. - public string AssistantId { get; } + public string AgentId { get; } /// The details used to create the new thread. If no thread is provided, an empty one will be created. public AgentThreadCreationOptions Thread { get; } /// The overridden model that the agent should use to run the thread. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.Serialization.cs index 4ff6f883a409..080727a4a5ab 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateThreadRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.cs index 786587e94f9b..7df0c883ffbc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateThreadRequest. internal partial class CreateThreadRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs index 5343cba7647e..10503c399688 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateVectorStoreFileBatchRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.cs index a206331985f4..599c2edae75b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateVectorStoreFileBatchRequest. internal partial class CreateVectorStoreFileBatchRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.Serialization.cs index e71ec7ac03ba..ac2d25c30eff 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateVectorStoreFileRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.cs index fba9287eb54a..810613bcb000 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateVectorStoreFileRequest. internal partial class CreateVectorStoreFileRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.Serialization.cs index ba3301bad406..af489fc1f4d3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class CreateVectorStoreRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.cs index fe9accc379e2..90d7177c5fb2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The CreateVectorStoreRequest. internal partial class CreateVectorStoreRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/DoneEvent.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/DoneEvent.cs index 9f658de4258c..057a3fc1c8fe 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/DoneEvent.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Terminal event indicating the successful end of a stream. public readonly partial struct DoneEvent : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ErrorEvent.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ErrorEvent.cs index ea570033f684..af54857da432 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ErrorEvent.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Terminal event indicating a server side error while streaming. public readonly partial struct ErrorEvent : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.Serialization.cs index c9a3042bc5de..fe1a0cd8846b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class FileSearchRankingOptions : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.cs index ca7922f55151..0bee9dc17e60 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Ranking options for file search. public partial class FileSearchRankingOptions diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.Serialization.cs index d4dd84071ff9..c77fd26e405f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class FileSearchToolCallContent : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.cs index 657101f969fe..9ca683fbc059 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The file search result content object. public partial class FileSearchToolCallContent diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContentType.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContentType.cs index 177f40ed440f..54926671afb2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContentType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The FileSearchToolCallContent_type. public readonly partial struct FileSearchToolCallContentType : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.Serialization.cs index 951e0992afeb..404c63227b0c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class FileSearchToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.cs index 1a1015fb4e16..e0ae175a2f52 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a file search tool as used to configure an agent. public partial class FileSearchToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs index 7aa0164df147..04e156beb5b4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class FileSearchToolDefinitionDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.cs index a2445583f91c..014d47631c51 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Options overrides for the file search tool. public partial class FileSearchToolDefinitionDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.Serialization.cs index 1a7908314e1e..cd0b47b04555 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class FileSearchToolResource : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.cs index 9dc2301d67ea..d1b9d2aebfbf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A set of resources that are used by the `file_search` tool. public partial class FileSearchToolResource diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileState.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FileState.cs index 7b3b0dcba332..647af60ef1cf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileState.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The state of the file. public readonly partial struct FileState : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.Serialization.cs index e45e5a20a55b..bfa830bb8142 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class FunctionName : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.cs index f0388befdeda..28f2ad2bae7c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The function name that will be used, if using the `function` tool. public partial class FunctionName diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.Serialization.cs index 8a248fb0cc81..6a913574090c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class FunctionToolDefinition : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("function"u8); - writer.WriteObjectValue(InternalFunction, options); + writer.WriteObjectValue(InternalFunction, options); } FunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.cs similarity index 60% rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.cs index f87f3594f991..7af78d0d14f9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.cs @@ -8,11 +8,22 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a function tool as used to configure an agent. public partial class FunctionToolDefinition : ToolDefinition { + /// Initializes a new instance of . + /// The definition of the concrete function that the function tool should call. + /// is null. + public FunctionToolDefinition(InternalFunctionDefinition internalFunction) + { + Argument.AssertNotNull(internalFunction, nameof(internalFunction)); + + Type = "function"; + InternalFunction = internalFunction; + } + /// Initializes a new instance of . /// The object type. /// Keeps track of any properties unknown to the library. @@ -26,5 +37,8 @@ internal FunctionToolDefinition(string type, IDictionary ser internal FunctionToolDefinition() { } + + /// The definition of the concrete function that the function tool should call. + public InternalFunctionDefinition InternalFunction { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteDetailsReason.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/IncompleteDetailsReason.cs index 517961f355be..e5f444eddb73 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteDetailsReason.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run. public readonly partial struct IncompleteDetailsReason : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.Serialization.cs index 6264642302cb..5c1f2fcd4447 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class IncompleteRunDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.cs index 786489fd3369..d5d82bbd4c61 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. public partial class IncompleteRunDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.Serialization.cs index d2c044c32c0a..e48c64f625de 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class IndexResource : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.cs index 40abed475999..a7f4aff47db6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A Index resource. public partial class IndexResource diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Argument.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..14f0d5e2e13b --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.AI.Agents +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..a75d617f1dcf --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.AI.Agents +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingList.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..af10b854d55e --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Agents +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..fc200f8b7805 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.AI.Agents +{ + internal static class ModelSerializationExtensions + { + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/MultipartFormDataRequestContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/MultipartFormDataRequestContent.cs new file mode 100644 index 000000000000..2701445e424c --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/MultipartFormDataRequestContent.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.IO; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Agents +{ + internal class MultipartFormDataRequestContent : RequestContent + { + private readonly System.Net.Http.MultipartFormDataContent _multipartContent; + private static readonly Random _random = new Random(); + private static readonly char[] _boundaryValues = "0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".ToCharArray(); + + public MultipartFormDataRequestContent() + { + _multipartContent = new System.Net.Http.MultipartFormDataContent(CreateBoundary()); + } + + public string ContentType + { + get + { + return _multipartContent.Headers.ContentType.ToString(); + } + } + + internal HttpContent HttpContent => _multipartContent; + + private static string CreateBoundary() + { + Span chars = new char[70]; + byte[] random = new byte[70]; + _random.NextBytes(random); + int mask = 255 >> 2; + for (int i = 0; i < 70; i++) + { + chars[i] = _boundaryValues[random[i] & mask]; + } + return chars.ToString(); + } + + public void Add(string content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new StringContent(content), name, filename, contentType); + } + + public void Add(int content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(long content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(float content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(double content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(decimal content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content.ToString("G", CultureInfo.InvariantCulture); + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(bool content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + string value = content ? "true" : "false"; + Add(new StringContent(value), name, filename, contentType); + } + + public void Add(Stream content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new StreamContent(content), name, filename, contentType); + } + + public void Add(byte[] content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new ByteArrayContent(content), name, filename, contentType); + } + + public void Add(BinaryData content, string name, string filename = null, string contentType = null) + { + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + Add(new ByteArrayContent(content.ToArray()), name, filename, contentType); + } + + private void Add(HttpContent content, string name, string filename, string contentType) + { + if (filename != null) + { + Argument.AssertNotNullOrEmpty(filename, nameof(filename)); + AddFilenameHeader(content, name, filename); + } + if (contentType != null) + { + Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); + AddContentTypeHeader(content, contentType); + } + _multipartContent.Add(content, name); + } + + public static void AddFilenameHeader(HttpContent content, string name, string filename) + { + ContentDispositionHeaderValue header = new ContentDispositionHeaderValue("form-data") { Name = name, FileName = filename }; + content.Headers.ContentDisposition = header; + } + + public static void AddContentTypeHeader(HttpContent content, string contentType) + { + MediaTypeHeaderValue header = new MediaTypeHeaderValue(contentType); + content.Headers.ContentType = header; + } + + public override bool TryComputeLength(out long length) + { + if (_multipartContent.Headers.ContentLength is long contentLength) + { + length = contentLength; + return true; + } + length = 0; + return false; + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { +#if NET6_0_OR_GREATER + _multipartContent.CopyTo(stream, default, cancellationToken); +#else +#pragma warning disable AZC0107 + _multipartContent.CopyToAsync(stream).EnsureCompleted(); +#pragma warning restore AZC0107 +#endif + } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { +#if NET6_0_OR_GREATER + await _multipartContent.CopyToAsync(stream, cancellationToken).ConfigureAwait(false); +#else + await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); +#endif + } + + public override void Dispose() + { + _multipartContent.Dispose(); + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Optional.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..6b76e4e60a98 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Agents +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..fd6ff392c729 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.AI.Agents +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatus.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatus.Serialization.cs index b1ed3f33de22..a892487ba156 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatus.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalAgentDeletionStatus : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatus.cs index 7eeef0999788..7eee68d5abb7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatus.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The status of an agent deletion operation. internal partial class InternalAgentDeletionStatus diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatusObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatusObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatusObject.cs index 00e557b64a84..cf893ec0d318 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAgentDeletionStatusObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The InternalAgentDeletionStatus_object. internal readonly partial struct InternalAgentDeletionStatusObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAzureFunctionDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalAzureFunctionDefinition.Serialization.cs index 1a3d51797196..2e9312592e62 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAzureFunctionDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalAzureFunctionDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAzureFunctionDefinition.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalAzureFunctionDefinition.cs index f566ee9d15b9..a2709e90b3ea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalAzureFunctionDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The definition of Azure function. internal partial class InternalAzureFunctionDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs index b08015c6239d..91c167b8b72d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalCodeInterpreterToolCallDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalCodeInterpreterToolCallDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalCodeInterpreterToolCallDetails.cs index 2a54a1c73402..7c658e4d2401 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalCodeInterpreterToolCallDetails.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The detailed information about a code interpreter invocation by the model. internal partial class InternalCodeInterpreterToolCallDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatus.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatus.Serialization.cs index 2e79fe58614c..3596a04a7f85 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatus.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalFileDeletionStatus : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatus.cs index 445d86d04e67..3cf7ad9445c1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatus.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A status response from a file deletion operation. internal partial class InternalFileDeletionStatus diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatusObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatusObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatusObject.cs index 2134fdb513f9..1ae3295c9be5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileDeletionStatusObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The InternalFileDeletionStatus_object. internal readonly partial struct InternalFileDeletionStatusObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponse.Serialization.cs similarity index 96% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponse.Serialization.cs index a209a815fef9..cfd422857168 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponse.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalFileListResponse : IUtf8JsonSerializable, IJsonModel { @@ -81,7 +81,7 @@ internal static InternalFileListResponse DeserializeInternalFileListResponse(Jso return null; } InternalFileListResponseObject @object = default; - IReadOnlyList data = default; + IReadOnlyList data = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -93,10 +93,10 @@ internal static InternalFileListResponse DeserializeInternalFileListResponse(Jso } if (property.NameEquals("data"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AgentFile.DeserializeAgentFile(item, options)); + array.Add(OpenAIFile.DeserializeOpenAIFile(item, options)); } data = array; continue; diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponse.cs similarity index 92% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponse.cs index f86f2ab77484..54cf15465085 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponse.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The response data from a file list operation. internal partial class InternalFileListResponse @@ -49,7 +49,7 @@ internal partial class InternalFileListResponse /// Initializes a new instance of . /// The files returned for the request. /// is null. - internal InternalFileListResponse(IEnumerable data) + internal InternalFileListResponse(IEnumerable data) { Argument.AssertNotNull(data, nameof(data)); @@ -60,7 +60,7 @@ internal InternalFileListResponse(IEnumerable data) /// The object type, which is always 'list'. /// The files returned for the request. /// Keeps track of any properties unknown to the library. - internal InternalFileListResponse(InternalFileListResponseObject @object, IReadOnlyList data, IDictionary serializedAdditionalRawData) + internal InternalFileListResponse(InternalFileListResponseObject @object, IReadOnlyList data, IDictionary serializedAdditionalRawData) { Object = @object; Data = data; @@ -76,6 +76,6 @@ internal InternalFileListResponse() public InternalFileListResponseObject Object { get; } = InternalFileListResponseObject.List; /// The files returned for the request. - public IReadOnlyList Data { get; } + public IReadOnlyList Data { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponseObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponseObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponseObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponseObject.cs index 9129c26b86bc..98137b7ee0b3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponseObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFileListResponseObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The InternalFileListResponse_object. internal readonly partial struct InternalFileListResponseObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFunctionDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFunctionDefinition.Serialization.cs index 33280a12208c..0a94e1a0a521 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFunctionDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalFunctionDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFunctionDefinition.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalFunctionDefinition.cs index e49213f1237b..0d64aad588ea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalFunctionDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a function. internal partial class InternalFunctionDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageImageFileDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageImageFileDetails.Serialization.cs index b1b06f2b7100..7c1a9da55909 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageImageFileDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalMessageImageFileDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageImageFileDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageImageFileDetails.cs index 150277d11fba..fee7cdada1cf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageImageFileDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// An image reference, as represented in thread message content. internal partial class InternalMessageImageFileDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextDetails.Serialization.cs index 925bfc4a3299..d426047a6132 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalMessageTextDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextDetails.cs similarity index 91% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextDetails.cs index 86770c52ed02..faf2c3c6384f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextDetails.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The text and associated annotations for a single item of agent thread message content. internal partial class InternalMessageTextDetails @@ -51,7 +51,7 @@ internal partial class InternalMessageTextDetails /// /// A list of annotations associated with this text. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// or is null. internal InternalMessageTextDetails(string text, IEnumerable annotations) @@ -68,7 +68,7 @@ internal InternalMessageTextDetails(string text, IEnumerable /// A list of annotations associated with this text. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// Keeps track of any properties unknown to the library. internal InternalMessageTextDetails(string text, IReadOnlyList annotations, IDictionary serializedAdditionalRawData) @@ -88,7 +88,7 @@ internal InternalMessageTextDetails() /// /// A list of annotations associated with this text. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public IReadOnlyList Annotations { get; } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs index 63a9fe71e364..735723f5b9d6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalMessageTextFileCitationDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFileCitationDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFileCitationDetails.cs index e61364394d03..943a77627bac 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFileCitationDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A representation of a file-based text citation, as used in a file-based annotation of text thread message content. internal partial class InternalMessageTextFileCitationDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs index 83e8097401f4..a8f29ff8348b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalMessageTextFilePathDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFilePathDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFilePathDetails.cs index 2315f125f95e..d1ce8f66662d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalMessageTextFilePathDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// An encapsulation of an image file ID, as used by message image content. internal partial class InternalMessageTextFilePathDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs index 7f694756379c..5c293906129d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalRequiredFunctionToolCallDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRequiredFunctionToolCallDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalRequiredFunctionToolCallDetails.cs index 9c17e43e2e0b..6e51e285ced1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRequiredFunctionToolCallDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The detailed information for a function invocation, as provided by a required action invoking a function tool, that includes the name of and arguments to the function. internal partial class InternalRequiredFunctionToolCallDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs index c770ebbbc9c2..c038b4647a86 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalRunStepFunctionToolCallDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRunStepFunctionToolCallDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalRunStepFunctionToolCallDetails.cs index ff1b24bd121c..f2eb6b436956 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalRunStepFunctionToolCallDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The detailed information about the function called by the model. internal partial class InternalRunStepFunctionToolCallDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs index 55573482ccd0..f27ba4a7fe83 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class InternalSubmitToolOutputsDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/InternalSubmitToolOutputsDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/InternalSubmitToolOutputsDetails.cs index 368d47db64fd..ab5a5a820c8d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/InternalSubmitToolOutputsDetails.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The details describing tools that should be called to submit tool outputs. internal partial class InternalSubmitToolOutputsDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ListSortOrder.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ListSortOrder.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ListSortOrder.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ListSortOrder.cs index 52bbc7987e71..7e8864d6ccc5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ListSortOrder.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ListSortOrder.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The available sorting options when requesting a list of response objects. public readonly partial struct ListSortOrder : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageAttachment.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageAttachment.Serialization.cs index 9a3751e9f5ea..79ad2fb057b6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageAttachment.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageAttachment : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageAttachment.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageAttachment.cs index be25230a7c4c..f476b377d950 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageAttachment.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// This describes to which tools a file has been attached. public partial class MessageAttachment diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageContent.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageContent.Serialization.cs index 96cc5b829d21..10916632baea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageContent.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownMessageContent))] public partial class MessageContent : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageContent.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageContent.cs index 17682f30308e..67a957bb2e64 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageContent.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of a single item of thread message content. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDelta.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDelta.Serialization.cs index 2131a64f0c1c..663f73df44f8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDelta.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDelta : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDelta.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDelta.cs index 764571c6aa11..98f2c7459a6b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDelta.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the typed 'delta' payload within a streaming message delta chunk. public partial class MessageDelta diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunk.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunk.Serialization.cs index b672132912cc..f60501475996 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunk.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaChunk : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunk.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunk.cs index cf40d797394f..2c19787b8bec 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunk.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a message delta i.e. any changed fields on a message during streaming. public partial class MessageDeltaChunk diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunkObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunkObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunkObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunkObject.cs index d21c2b7731b4..0b269388fcb9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunkObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaChunkObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The MessageDeltaChunk_object. public readonly partial struct MessageDeltaChunkObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaContent.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaContent.Serialization.cs index 86bc3e76c4a9..ea7fd440df35 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaContent.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownMessageDeltaContent))] public partial class MessageDeltaContent : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaContent.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaContent.cs index 367980dcb8a0..d7df05f2f54c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaContent.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// The abstract base representation of a partial streamed message content payload. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContent.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContent.Serialization.cs index 80ef6edf733c..0897eb5d74ae 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaImageFileContent : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContent.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContent.cs index 782ee27b4b55..f98ac7f33b79 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContent.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a streamed image file content part within a streaming message delta chunk. public partial class MessageDeltaImageFileContent : MessageDeltaContent diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs index 0772f9b9743f..d43b01fa56ad 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaImageFileContentObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContentObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContentObject.cs index e62ccc339207..db9f5d749698 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaImageFileContentObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the 'image_file' payload within streaming image file content. public partial class MessageDeltaImageFileContentObject diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextAnnotation.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextAnnotation.Serialization.cs index 3b315583ceb7..23e1b714ad9c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextAnnotation.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownMessageDeltaTextAnnotation))] public partial class MessageDeltaTextAnnotation : IUtf8JsonSerializable, IJsonModel @@ -81,6 +81,7 @@ internal static MessageDeltaTextAnnotation DeserializeMessageDeltaTextAnnotation { case "file_citation": return MessageDeltaTextFileCitationAnnotation.DeserializeMessageDeltaTextFileCitationAnnotation(element, options); case "file_path": return MessageDeltaTextFilePathAnnotation.DeserializeMessageDeltaTextFilePathAnnotation(element, options); + case "url_citation": return MessageDeltaTextUrlCitationAnnotation.DeserializeMessageDeltaTextUrlCitationAnnotation(element, options); } } return UnknownMessageDeltaTextAnnotation.DeserializeUnknownMessageDeltaTextAnnotation(element, options); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextAnnotation.cs similarity index 95% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextAnnotation.cs index a283e7754283..474c8aa056c9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextAnnotation.cs @@ -8,12 +8,12 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// The abstract base representation of a streamed text content part's text annotation. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public abstract partial class MessageDeltaTextAnnotation { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContent.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContent.Serialization.cs index f3dbe17210d1..451b96c54077 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaTextContent : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContent.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContent.cs index af3ed70f6d9c..5c8757080da9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContent.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a streamed text content part within a streaming message delta chunk. public partial class MessageDeltaTextContent : MessageDeltaContent diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContentObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContentObject.Serialization.cs index 4604c724436c..fb7b28bf06ae 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContentObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaTextContentObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContentObject.cs similarity index 91% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContentObject.cs index c7965b213a24..738a64559de3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextContentObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the data of a streamed text content part within a streaming message delta chunk. public partial class MessageDeltaTextContentObject @@ -56,7 +56,7 @@ internal MessageDeltaTextContentObject() /// /// Annotations for the text. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// Keeps track of any properties unknown to the library. internal MessageDeltaTextContentObject(string value, IReadOnlyList annotations, IDictionary serializedAdditionalRawData) @@ -71,7 +71,7 @@ internal MessageDeltaTextContentObject(string value, IReadOnlyList /// Annotations for the text. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public IReadOnlyList Annotations { get; } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs index d7a6b18301d1..e0f784615ebb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaTextFileCitationAnnotation : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotation.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotation.cs index f22164e3a330..72121964aa82 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotation.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a streamed file citation applied to a streaming text content part. public partial class MessageDeltaTextFileCitationAnnotation : MessageDeltaTextAnnotation diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs index a82c41d59813..7744262fbf94 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaTextFileCitationAnnotationObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs index ef326afe631b..2809a9b08e35 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the data of a streamed file citation as applied to a streaming text content part. public partial class MessageDeltaTextFileCitationAnnotationObject diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs index c6258fb19486..c1c6f324fd48 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaTextFilePathAnnotation : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotation.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotation.cs index 90bf54d5059b..81dc1fa89a1d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotation.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a streamed file path annotation applied to a streaming text content part. public partial class MessageDeltaTextFilePathAnnotation : MessageDeltaTextAnnotation diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs index 76ebcc5ed623..1c0b4ad35c65 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageDeltaTextFilePathAnnotationObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs index 0bc0e8a00517..5323ff16d974 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the data of a streamed file path annotation as applied to a streaming text content part. public partial class MessageDeltaTextFilePathAnnotationObject diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.Serialization.cs new file mode 100644 index 000000000000..a488acab0998 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Agents +{ + public partial class MessageDeltaTextUrlCitationAnnotation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationAnnotation)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("url_citation"u8); + writer.WriteObjectValue(UrlCitation, options); + if (Optional.IsDefined(StartIndex)) + { + writer.WritePropertyName("start_index"u8); + writer.WriteNumberValue(StartIndex.Value); + } + if (Optional.IsDefined(EndIndex)) + { + writer.WritePropertyName("end_index"u8); + writer.WriteNumberValue(EndIndex.Value); + } + } + + MessageDeltaTextUrlCitationAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationAnnotation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMessageDeltaTextUrlCitationAnnotation(document.RootElement, options); + } + + internal static MessageDeltaTextUrlCitationAnnotation DeserializeMessageDeltaTextUrlCitationAnnotation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MessageDeltaTextUrlCitationDetails urlCitation = default; + int? startIndex = default; + int? endIndex = default; + int index = default; + string type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url_citation"u8)) + { + urlCitation = MessageDeltaTextUrlCitationDetails.DeserializeMessageDeltaTextUrlCitationDetails(property.Value, options); + continue; + } + if (property.NameEquals("start_index"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("end_index"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("index"u8)) + { + index = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MessageDeltaTextUrlCitationAnnotation( + index, + type, + serializedAdditionalRawData, + urlCitation, + startIndex, + endIndex); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationAnnotation)} does not support writing '{options.Format}' format."); + } + } + + MessageDeltaTextUrlCitationAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMessageDeltaTextUrlCitationAnnotation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationAnnotation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new MessageDeltaTextUrlCitationAnnotation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMessageDeltaTextUrlCitationAnnotation(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.cs new file mode 100644 index 000000000000..40a72100bc2c --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationAnnotation.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents +{ + /// A citation within the message that points to a specific URL associated with the message. Generated when the agent uses tools such as 'bing_grounding' to search the Internet. + public partial class MessageDeltaTextUrlCitationAnnotation : MessageDeltaTextAnnotation + { + /// Initializes a new instance of . + /// The index of the annotation within a text content part. + /// The details of the URL citation. + /// is null. + internal MessageDeltaTextUrlCitationAnnotation(int index, MessageDeltaTextUrlCitationDetails urlCitation) : base(index) + { + Argument.AssertNotNull(urlCitation, nameof(urlCitation)); + + Type = "url_citation"; + UrlCitation = urlCitation; + } + + /// Initializes a new instance of . + /// The index of the annotation within a text content part. + /// The type of the text content annotation. + /// Keeps track of any properties unknown to the library. + /// The details of the URL citation. + /// The first text index associated with this text annotation. + /// The last text index associated with this text annotation. + internal MessageDeltaTextUrlCitationAnnotation(int index, string type, IDictionary serializedAdditionalRawData, MessageDeltaTextUrlCitationDetails urlCitation, int? startIndex, int? endIndex) : base(index, type, serializedAdditionalRawData) + { + UrlCitation = urlCitation; + StartIndex = startIndex; + EndIndex = endIndex; + } + + /// Initializes a new instance of for deserialization. + internal MessageDeltaTextUrlCitationAnnotation() + { + } + + /// The details of the URL citation. + public MessageDeltaTextUrlCitationDetails UrlCitation { get; } + /// The first text index associated with this text annotation. + public int? StartIndex { get; } + /// The last text index associated with this text annotation. + public int? EndIndex { get; } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.Serialization.cs new file mode 100644 index 000000000000..66fe3268fa8e --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Agents +{ + public partial class MessageDeltaTextUrlCitationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MessageDeltaTextUrlCitationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMessageDeltaTextUrlCitationDetails(document.RootElement, options); + } + + internal static MessageDeltaTextUrlCitationDetails DeserializeMessageDeltaTextUrlCitationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + string title = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MessageDeltaTextUrlCitationDetails(url, title, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationDetails)} does not support writing '{options.Format}' format."); + } + } + + MessageDeltaTextUrlCitationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMessageDeltaTextUrlCitationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MessageDeltaTextUrlCitationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMessageDeltaTextUrlCitationDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.cs new file mode 100644 index 000000000000..e31a7bf408ab --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageDeltaTextUrlCitationDetails.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents +{ + /// A representation of a URL citation, as used in text thread message content. + public partial class MessageDeltaTextUrlCitationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL associated with this citation. + /// is null. + internal MessageDeltaTextUrlCitationDetails(string url) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + } + + /// Initializes a new instance of . + /// The URL associated with this citation. + /// The title of the URL. + /// Keeps track of any properties unknown to the library. + internal MessageDeltaTextUrlCitationDetails(string url, string title, IDictionary serializedAdditionalRawData) + { + Url = url; + Title = title; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MessageDeltaTextUrlCitationDetails() + { + } + + /// The URL associated with this citation. + public string Url { get; } + /// The title of the URL. + public string Title { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageImageFileContent.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageImageFileContent.Serialization.cs index 2e40246db045..d0c60b3b61e8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageImageFileContent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageImageFileContent : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("image_file"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); } MessageImageFileContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageImageFileContent.cs similarity index 60% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageImageFileContent.cs index 02acadb61ba2..8f7581e3469d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageImageFileContent.cs @@ -8,11 +8,22 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A representation of image file content in a thread message. public partial class MessageImageFileContent : MessageContent { + /// Initializes a new instance of . + /// The image file for this thread message content item. + /// is null. + internal MessageImageFileContent(InternalMessageImageFileDetails internalDetails) + { + Argument.AssertNotNull(internalDetails, nameof(internalDetails)); + + Type = "image_file"; + InternalDetails = internalDetails; + } + /// Initializes a new instance of . /// The object type. /// Keeps track of any properties unknown to the library. @@ -26,5 +37,8 @@ internal MessageImageFileContent(string type, IDictionary se internal MessageImageFileContent() { } + + /// The image file for this thread message content item. + public InternalMessageImageFileDetails InternalDetails { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetails.Serialization.cs index 090b80f64694..90822396b65a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageIncompleteDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetails.cs index 5688889deda3..6e744ebb886f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Information providing additional detail about a message entering an incomplete status. public partial class MessageIncompleteDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetailsReason.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetailsReason.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetailsReason.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetailsReason.cs index 46c6f650afab..ea010698f3fc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetailsReason.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageIncompleteDetailsReason.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A set of reasons describing why a message is marked as incomplete. public readonly partial struct MessageIncompleteDetailsReason : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageRole.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageRole.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageRole.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageRole.cs index e60b22c12089..049636d4fe40 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageRole.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageRole.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The possible values for roles attributed to messages in a thread. public readonly partial struct MessageRole : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageStatus.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageStatus.cs index 79b8382bc0ef..242b1c300ae4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageStatus.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The possible execution status values for a thread message. public readonly partial struct MessageStatus : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageStreamEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageStreamEvent.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageStreamEvent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageStreamEvent.cs index 333c12b43a3f..ee40a37c8e40 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageStreamEvent.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Message operation related streaming events. public readonly partial struct MessageStreamEvent : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextAnnotation.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextAnnotation.Serialization.cs index b09bc9706917..61a90ac55420 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextAnnotation.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownMessageTextAnnotation))] public partial class MessageTextAnnotation : IUtf8JsonSerializable, IJsonModel @@ -81,6 +81,7 @@ internal static MessageTextAnnotation DeserializeMessageTextAnnotation(JsonEleme { case "file_citation": return MessageTextFileCitationAnnotation.DeserializeMessageTextFileCitationAnnotation(element, options); case "file_path": return MessageTextFilePathAnnotation.DeserializeMessageTextFilePathAnnotation(element, options); + case "url_citation": return MessageTextUrlCitationAnnotation.DeserializeMessageTextUrlCitationAnnotation(element, options); } } return UnknownMessageTextAnnotation.DeserializeUnknownMessageTextAnnotation(element, options); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextAnnotation.cs similarity index 95% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextAnnotation.cs index 63dbe8c6d7b9..3a5f340bd717 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextAnnotation.cs @@ -8,12 +8,12 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of an annotation to text thread message content. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public abstract partial class MessageTextAnnotation { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextContent.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextContent.Serialization.cs index 563ce17f6ff6..d7b23b2f5308 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextContent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageTextContent : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("text"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); } MessageTextContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextContent.cs similarity index 60% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextContent.cs index bfc181bb0a23..bc0b23b51c2c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextContent.cs @@ -8,11 +8,22 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A representation of a textual item of thread message content. public partial class MessageTextContent : MessageContent { + /// Initializes a new instance of . + /// The text and associated annotations for this thread message content item. + /// is null. + internal MessageTextContent(InternalMessageTextDetails internalDetails) + { + Argument.AssertNotNull(internalDetails, nameof(internalDetails)); + + Type = "text"; + InternalDetails = internalDetails; + } + /// Initializes a new instance of . /// The object type. /// Keeps track of any properties unknown to the library. @@ -26,5 +37,8 @@ internal MessageTextContent(string type, IDictionary seriali internal MessageTextContent() { } + + /// The text and associated annotations for this thread message content item. + public InternalMessageTextDetails InternalDetails { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs index 0be8235cee01..dd11e8af861b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageTextFileCitationAnnotation : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("file_citation"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); if (Optional.IsDefined(StartIndex)) { writer.WritePropertyName("start_index"u8); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFileCitationAnnotation.cs similarity index 63% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFileCitationAnnotation.cs index f1295b6fa3d9..700a8e17f86c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFileCitationAnnotation.cs @@ -8,11 +8,27 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the 'file_search' tool to search files. public partial class MessageTextFileCitationAnnotation : MessageTextAnnotation { + /// Initializes a new instance of . + /// The textual content associated with this text annotation item. + /// + /// A citation within the message that points to a specific quote from a specific file. + /// Generated when the agent uses the "file_search" tool to search files. + /// + /// or is null. + internal MessageTextFileCitationAnnotation(string text, InternalMessageTextFileCitationDetails internalDetails) : base(text) + { + Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(internalDetails, nameof(internalDetails)); + + Type = "file_citation"; + InternalDetails = internalDetails; + } + /// Initializes a new instance of . /// The object type. /// The textual content associated with this text annotation item. @@ -34,6 +50,12 @@ internal MessageTextFileCitationAnnotation(string type, string text, IDictionary internal MessageTextFileCitationAnnotation() { } + + /// + /// A citation within the message that points to a specific quote from a specific file. + /// Generated when the agent uses the "file_search" tool to search files. + /// + public InternalMessageTextFileCitationDetails InternalDetails { get; } /// The first text index associated with this text annotation. public int? StartIndex { get; } /// The last text index associated with this text annotation. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFilePathAnnotation.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFilePathAnnotation.Serialization.cs index 4f60bfd83a5e..e14a673d613a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFilePathAnnotation.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MessageTextFilePathAnnotation : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("file_path"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); if (Optional.IsDefined(StartIndex)) { writer.WritePropertyName("start_index"u8); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFilePathAnnotation.cs similarity index 64% rename from sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFilePathAnnotation.cs index ccf74d5173f4..9b1792194122 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextFilePathAnnotation.cs @@ -8,11 +8,24 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A citation within the message that points to a file located at a specific path. public partial class MessageTextFilePathAnnotation : MessageTextAnnotation { + /// Initializes a new instance of . + /// The textual content associated with this text annotation item. + /// A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. + /// or is null. + internal MessageTextFilePathAnnotation(string text, InternalMessageTextFilePathDetails internalDetails) : base(text) + { + Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(internalDetails, nameof(internalDetails)); + + Type = "file_path"; + InternalDetails = internalDetails; + } + /// Initializes a new instance of . /// The object type. /// The textual content associated with this text annotation item. @@ -31,6 +44,9 @@ internal MessageTextFilePathAnnotation(string type, string text, IDictionary A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. + public InternalMessageTextFilePathDetails InternalDetails { get; } /// The first text index associated with this text annotation. public int? StartIndex { get; } /// The last text index associated with this text annotation. diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.Serialization.cs new file mode 100644 index 000000000000..d255a9d2ae98 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Agents +{ + public partial class MessageTextUrlCitationAnnotation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageTextUrlCitationAnnotation)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("url_citation"u8); + writer.WriteObjectValue(UrlCitation, options); + if (Optional.IsDefined(StartIndex)) + { + writer.WritePropertyName("start_index"u8); + writer.WriteNumberValue(StartIndex.Value); + } + if (Optional.IsDefined(EndIndex)) + { + writer.WritePropertyName("end_index"u8); + writer.WriteNumberValue(EndIndex.Value); + } + } + + MessageTextUrlCitationAnnotation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageTextUrlCitationAnnotation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMessageTextUrlCitationAnnotation(document.RootElement, options); + } + + internal static MessageTextUrlCitationAnnotation DeserializeMessageTextUrlCitationAnnotation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MessageTextUrlCitationDetails urlCitation = default; + int? startIndex = default; + int? endIndex = default; + string type = default; + string text = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url_citation"u8)) + { + urlCitation = MessageTextUrlCitationDetails.DeserializeMessageTextUrlCitationDetails(property.Value, options); + continue; + } + if (property.NameEquals("start_index"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("end_index"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endIndex = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MessageTextUrlCitationAnnotation( + type, + text, + serializedAdditionalRawData, + urlCitation, + startIndex, + endIndex); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MessageTextUrlCitationAnnotation)} does not support writing '{options.Format}' format."); + } + } + + MessageTextUrlCitationAnnotation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMessageTextUrlCitationAnnotation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MessageTextUrlCitationAnnotation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new MessageTextUrlCitationAnnotation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMessageTextUrlCitationAnnotation(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.cs new file mode 100644 index 000000000000..7c0f6927a006 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationAnnotation.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents +{ + /// A citation within the message that points to a specific URL associated with the message. Generated when the agent uses tools such as 'bing_grounding' to search the Internet. + public partial class MessageTextUrlCitationAnnotation : MessageTextAnnotation + { + /// Initializes a new instance of . + /// The textual content associated with this text annotation item. + /// The details of the URL citation. + /// or is null. + internal MessageTextUrlCitationAnnotation(string text, MessageTextUrlCitationDetails urlCitation) : base(text) + { + Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(urlCitation, nameof(urlCitation)); + + Type = "url_citation"; + UrlCitation = urlCitation; + } + + /// Initializes a new instance of . + /// The object type. + /// The textual content associated with this text annotation item. + /// Keeps track of any properties unknown to the library. + /// The details of the URL citation. + /// The first text index associated with this text annotation. + /// The last text index associated with this text annotation. + internal MessageTextUrlCitationAnnotation(string type, string text, IDictionary serializedAdditionalRawData, MessageTextUrlCitationDetails urlCitation, int? startIndex, int? endIndex) : base(type, text, serializedAdditionalRawData) + { + UrlCitation = urlCitation; + StartIndex = startIndex; + EndIndex = endIndex; + } + + /// Initializes a new instance of for deserialization. + internal MessageTextUrlCitationAnnotation() + { + } + + /// The details of the URL citation. + public MessageTextUrlCitationDetails UrlCitation { get; } + /// The first text index associated with this text annotation. + public int? StartIndex { get; } + /// The last text index associated with this text annotation. + public int? EndIndex { get; } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.Serialization.cs new file mode 100644 index 000000000000..90a62eb0f191 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Agents +{ + public partial class MessageTextUrlCitationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageTextUrlCitationDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MessageTextUrlCitationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageTextUrlCitationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMessageTextUrlCitationDetails(document.RootElement, options); + } + + internal static MessageTextUrlCitationDetails DeserializeMessageTextUrlCitationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + string title = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MessageTextUrlCitationDetails(url, title, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MessageTextUrlCitationDetails)} does not support writing '{options.Format}' format."); + } + } + + MessageTextUrlCitationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeMessageTextUrlCitationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MessageTextUrlCitationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MessageTextUrlCitationDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMessageTextUrlCitationDetails(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.cs new file mode 100644 index 000000000000..518bae242120 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MessageTextUrlCitationDetails.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents +{ + /// A representation of a URL citation, as used in text thread message content. + public partial class MessageTextUrlCitationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The URL associated with this citation. + /// is null. + internal MessageTextUrlCitationDetails(string url) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + } + + /// Initializes a new instance of . + /// The URL associated with this citation. + /// The title of the URL. + /// Keeps track of any properties unknown to the library. + internal MessageTextUrlCitationDetails(string url, string title, IDictionary serializedAdditionalRawData) + { + Url = url; + Title = title; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MessageTextUrlCitationDetails() + { + } + + /// The URL associated with this citation. + public string Url { get; } + /// The title of the URL. + public string Title { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs index ad1aecac6013..cc20db9c62bb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class MicrosoftFabricToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/MicrosoftFabricToolDefinition.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/MicrosoftFabricToolDefinition.cs index f62e63d2f7f0..83c776ace364 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/MicrosoftFabricToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a Microsoft Fabric tool as used to configure an agent. public partial class MicrosoftFabricToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ModifyVectorStoreRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ModifyVectorStoreRequest.Serialization.cs index bacc1206914a..7ee54c0cf410 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ModifyVectorStoreRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class ModifyVectorStoreRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ModifyVectorStoreRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ModifyVectorStoreRequest.cs index dc1d4cb9889d..d1b9e26c66f1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ModifyVectorStoreRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The ModifyVectorStoreRequest. internal partial class ModifyVectorStoreRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFile.Serialization.cs similarity index 75% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFile.Serialization.cs index 3f15de1e7162..27081e3bb431 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFile.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - public partial class AgentFile : IUtf8JsonSerializable, IJsonModel + public partial class OpenAIFile : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,14 +28,14 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentFile)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIFile)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); + writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("bytes"u8); @@ -73,19 +73,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AgentFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentFile)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIFile)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentFile(document.RootElement, options); + return DeserializeOpenAIFile(document.RootElement, options); } - internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIFile DeserializeOpenAIFile(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -93,12 +93,12 @@ internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderW { return null; } - string @object = default; + OpenAIFileObject @object = default; string id = default; int bytes = default; string filename = default; DateTimeOffset createdAt = default; - AgentFilePurpose purpose = default; + OpenAIFilePurpose purpose = default; FileState? status = default; string statusDetails = default; IDictionary serializedAdditionalRawData = default; @@ -107,7 +107,7 @@ internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderW { if (property.NameEquals("object"u8)) { - @object = property.Value.GetString(); + @object = new OpenAIFileObject(property.Value.GetString()); continue; } if (property.NameEquals("id"u8)) @@ -117,7 +117,7 @@ internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderW } if (property.NameEquals("bytes"u8)) { - DeserializeNullableSize(property, ref bytes); + bytes = property.Value.GetInt32(); continue; } if (property.NameEquals("filename"u8)) @@ -132,7 +132,7 @@ internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderW } if (property.NameEquals("purpose"u8)) { - purpose = new AgentFilePurpose(property.Value.GetString()); + purpose = new OpenAIFilePurpose(property.Value.GetString()); continue; } if (property.NameEquals("status"u8)) @@ -155,7 +155,7 @@ internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderW } } serializedAdditionalRawData = rawDataDictionary; - return new AgentFile( + return new OpenAIFile( @object, id, bytes, @@ -167,43 +167,43 @@ internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderW serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(AgentFile)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIFile)} does not support writing '{options.Format}' format."); } } - AgentFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OpenAIFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAgentFile(document.RootElement, options); + return DeserializeOpenAIFile(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AgentFile)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIFile)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static AgentFile FromResponse(Response response) + internal static OpenAIFile FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAgentFile(document.RootElement); + return DeserializeOpenAIFile(document.RootElement); } /// Convert into a . diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFile.cs similarity index 83% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFile.cs index 69b2db4aa1b8..691a29a5a63d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFile.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents an agent that can call the model and use tools. - public partial class AgentFile + public partial class OpenAIFile { /// /// Keeps track of any properties unknown to the library. @@ -45,14 +45,14 @@ public partial class AgentFile /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The identifier, which can be referenced in API endpoints. /// The size of the file, in bytes. /// The name of the file. /// The Unix timestamp, in seconds, representing when this object was created. /// The intended purpose of a file. /// or is null. - internal AgentFile(string id, int size, string filename, DateTimeOffset createdAt, AgentFilePurpose purpose) + internal OpenAIFile(string id, int size, string filename, DateTimeOffset createdAt, OpenAIFilePurpose purpose) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(filename, nameof(filename)); @@ -64,7 +64,7 @@ internal AgentFile(string id, int size, string filename, DateTimeOffset createdA Purpose = purpose; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The object type, which is always 'file'. /// The identifier, which can be referenced in API endpoints. /// The size of the file, in bytes. @@ -74,7 +74,7 @@ internal AgentFile(string id, int size, string filename, DateTimeOffset createdA /// The state of the file. This field is available in Azure OpenAI only. /// The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. /// Keeps track of any properties unknown to the library. - internal AgentFile(string @object, string id, int size, string filename, DateTimeOffset createdAt, AgentFilePurpose purpose, FileState? status, string statusDetails, IDictionary serializedAdditionalRawData) + internal OpenAIFile(OpenAIFileObject @object, string id, int size, string filename, DateTimeOffset createdAt, OpenAIFilePurpose purpose, FileState? status, string statusDetails, IDictionary serializedAdditionalRawData) { Object = @object; Id = id; @@ -87,11 +87,14 @@ internal AgentFile(string @object, string id, int size, string filename, DateTim _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AgentFile() + /// Initializes a new instance of for deserialization. + internal OpenAIFile() { } + /// The object type, which is always 'file'. + public OpenAIFileObject Object { get; } = OpenAIFileObject.File; + /// The identifier, which can be referenced in API endpoints. public string Id { get; } /// The size of the file, in bytes. @@ -101,7 +104,7 @@ internal AgentFile() /// The Unix timestamp, in seconds, representing when this object was created. public DateTimeOffset CreatedAt { get; } /// The intended purpose of a file. - public AgentFilePurpose Purpose { get; } + public OpenAIFilePurpose Purpose { get; } /// The state of the file. This field is available in Azure OpenAI only. public FileState? Status { get; } /// The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFileObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFileObject.cs new file mode 100644 index 000000000000..f2ce196e0706 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFileObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The OpenAIFile_object. + public readonly partial struct OpenAIFileObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OpenAIFileObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FileValue = "file"; + + /// file. + public static OpenAIFileObject File { get; } = new OpenAIFileObject(FileValue); + /// Determines if two values are the same. + public static bool operator ==(OpenAIFileObject left, OpenAIFileObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OpenAIFileObject left, OpenAIFileObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OpenAIFileObject(string value) => new OpenAIFileObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OpenAIFileObject other && Equals(other); + /// + public bool Equals(OpenAIFileObject 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/AgentFilePurpose.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFilePurpose.cs similarity index 53% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentFilePurpose.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFilePurpose.cs index 825a6ce4fe43..ceaf578367ae 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFilePurpose.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIFilePurpose.cs @@ -8,16 +8,16 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The possible values denoting the intended usage of a file. - public readonly partial struct AgentFilePurpose : IEquatable + public readonly partial struct OpenAIFilePurpose : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public AgentFilePurpose(string value) + public OpenAIFilePurpose(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -31,31 +31,31 @@ public AgentFilePurpose(string value) private const string VisionValue = "vision"; /// Indicates a file is used for fine tuning input. - public static AgentFilePurpose FineTune { get; } = new AgentFilePurpose(FineTuneValue); + public static OpenAIFilePurpose FineTune { get; } = new OpenAIFilePurpose(FineTuneValue); /// Indicates a file is used for fine tuning results. - public static AgentFilePurpose FineTuneResults { get; } = new AgentFilePurpose(FineTuneResultsValue); + public static OpenAIFilePurpose FineTuneResults { get; } = new OpenAIFilePurpose(FineTuneResultsValue); /// Indicates a file is used as input to agents. - public static AgentFilePurpose Agents { get; } = new AgentFilePurpose(AgentsValue); + public static OpenAIFilePurpose Agents { get; } = new OpenAIFilePurpose(AgentsValue); /// Indicates a file is used as output by agents. - public static AgentFilePurpose AgentsOutput { get; } = new AgentFilePurpose(AgentsOutputValue); + public static OpenAIFilePurpose AgentsOutput { get; } = new OpenAIFilePurpose(AgentsOutputValue); /// Indicates a file is used as input to . - public static AgentFilePurpose Batch { get; } = new AgentFilePurpose(BatchValue); + public static OpenAIFilePurpose Batch { get; } = new OpenAIFilePurpose(BatchValue); /// Indicates a file is used as output by a vector store batch operation. - public static AgentFilePurpose BatchOutput { get; } = new AgentFilePurpose(BatchOutputValue); + public static OpenAIFilePurpose BatchOutput { get; } = new OpenAIFilePurpose(BatchOutputValue); /// Indicates a file is used as input to a vision operation. - public static AgentFilePurpose Vision { get; } = new AgentFilePurpose(VisionValue); - /// Determines if two values are the same. - public static bool operator ==(AgentFilePurpose left, AgentFilePurpose right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentFilePurpose left, AgentFilePurpose right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentFilePurpose(string value) => new AgentFilePurpose(value); + public static OpenAIFilePurpose Vision { get; } = new OpenAIFilePurpose(VisionValue); + /// Determines if two values are the same. + public static bool operator ==(OpenAIFilePurpose left, OpenAIFilePurpose right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OpenAIFilePurpose left, OpenAIFilePurpose right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OpenAIFilePurpose(string value) => new OpenAIFilePurpose(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentFilePurpose other && Equals(other); + public override bool Equals(object obj) => obj is OpenAIFilePurpose other && Equals(other); /// - public bool Equals(AgentFilePurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(OpenAIFilePurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.Serialization.cs similarity index 66% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.Serialization.cs index d3d26866045a..9f03ef5d0012 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - public partial class AgentPageableListOfVectorStoreFile : IUtf8JsonSerializable, IJsonModel + internal partial class OpenAIPageableListOfAgent : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStoreFile)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfAgent)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AgentPageableListOfVectorStoreFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIPageableListOfAgent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStoreFile)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfAgent)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentPageableListOfVectorStoreFile(document.RootElement, options); + return DeserializeOpenAIPageableListOfAgent(document.RootElement, options); } - internal static AgentPageableListOfVectorStoreFile DeserializeAgentPageableListOfVectorStoreFile(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIPageableListOfAgent DeserializeOpenAIPageableListOfAgent(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,8 +86,8 @@ internal static AgentPageableListOfVectorStoreFile DeserializeAgentPageableListO { return null; } - AgentPageableListOfVectorStoreFileObject @object = default; - IReadOnlyList data = default; + OpenAIPageableListOfAgentObject @object = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; @@ -97,15 +97,15 @@ internal static AgentPageableListOfVectorStoreFile DeserializeAgentPageableListO { if (property.NameEquals("object"u8)) { - @object = new AgentPageableListOfVectorStoreFileObject(property.Value.GetString()); + @object = new OpenAIPageableListOfAgentObject(property.Value.GetString()); continue; } if (property.NameEquals("data"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VectorStoreFile.DeserializeVectorStoreFile(item, options)); + array.Add(Agent.DeserializeAgent(item, options)); } data = array; continue; @@ -131,7 +131,7 @@ internal static AgentPageableListOfVectorStoreFile DeserializeAgentPageableListO } } serializedAdditionalRawData = rawDataDictionary; - return new AgentPageableListOfVectorStoreFile( + return new OpenAIPageableListOfAgent( @object, data, firstId, @@ -140,43 +140,43 @@ internal static AgentPageableListOfVectorStoreFile DeserializeAgentPageableListO serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStoreFile)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfAgent)} does not support writing '{options.Format}' format."); } } - AgentPageableListOfVectorStoreFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OpenAIPageableListOfAgent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAgentPageableListOfVectorStoreFile(document.RootElement, options); + return DeserializeOpenAIPageableListOfAgent(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStoreFile)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfAgent)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static AgentPageableListOfVectorStoreFile FromResponse(Response response) + internal static OpenAIPageableListOfAgent FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAgentPageableListOfVectorStoreFile(document.RootElement); + return DeserializeOpenAIPageableListOfAgent(document.RootElement); } /// Convert into a . diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.cs similarity index 82% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.cs index 84aaa431daf7..ca25b3123b98 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgent.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfAgent + internal partial class OpenAIPageableListOfAgent { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ internal partial class InternalOpenAIPageableListOfAgent /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// 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. /// , or is null. - internal InternalOpenAIPageableListOfAgent(IEnumerable data, string firstId, string lastId, bool hasMore) + internal OpenAIPageableListOfAgent(IEnumerable data, string firstId, string lastId, bool hasMore) { Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNull(firstId, nameof(firstId)); @@ -64,14 +64,14 @@ internal InternalOpenAIPageableListOfAgent(IEnumerable data, string first HasMore = hasMore; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The object type, which is always list. /// The requested list of items. /// The first ID represented in this list. /// The last ID represented in this list. /// A value indicating whether there are additional values available not captured in this list. /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfAgent(OpenAIPageableListOfAgentObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal OpenAIPageableListOfAgent(OpenAIPageableListOfAgentObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) { Object = @object; Data = data; @@ -81,8 +81,8 @@ internal InternalOpenAIPageableListOfAgent(OpenAIPageableListOfAgentObject @obje _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfAgent() + /// Initializes a new instance of for deserialization. + internal OpenAIPageableListOfAgent() { } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgentObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgentObject.cs index 4b60fb3f9fac..43cf168d50e4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfAgentObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The OpenAIPageableListOfAgent_object. internal readonly partial struct OpenAIPageableListOfAgentObject : IEquatable diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.Serialization.cs new file mode 100644 index 000000000000..4ed47e4008e6 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.Serialization.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Agents +{ + internal partial class OpenAIPageableListOfRunStep : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAIPageableListOfRunStep)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("object"u8); + writer.WriteStringValue(Object.ToString()); + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (var item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OpenAIPageableListOfRunStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OpenAIPageableListOfRunStep)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOpenAIPageableListOfRunStep(document.RootElement, options); + } + + internal static OpenAIPageableListOfRunStep DeserializeOpenAIPageableListOfRunStep(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OpenAIPageableListOfRunStepObject @object = default; + IReadOnlyList data = default; + string firstId = default; + string lastId = default; + bool hasMore = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("object"u8)) + { + @object = new OpenAIPageableListOfRunStepObject(property.Value.GetString()); + continue; + } + if (property.NameEquals("data"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RunStep.DeserializeRunStep(item, options)); + } + data = array; + continue; + } + if (property.NameEquals("first_id"u8)) + { + firstId = property.Value.GetString(); + continue; + } + if (property.NameEquals("last_id"u8)) + { + lastId = property.Value.GetString(); + continue; + } + if (property.NameEquals("has_more"u8)) + { + hasMore = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OpenAIPageableListOfRunStep( + @object, + data, + firstId, + lastId, + hasMore, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OpenAIPageableListOfRunStep)} does not support writing '{options.Format}' format."); + } + } + + OpenAIPageableListOfRunStep IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOpenAIPageableListOfRunStep(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OpenAIPageableListOfRunStep)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static OpenAIPageableListOfRunStep FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOpenAIPageableListOfRunStep(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.cs similarity index 82% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.cs index ce4995ab4380..c1ba296f5c61 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStep.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfRunStep + internal partial class OpenAIPageableListOfRunStep { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ internal partial class InternalOpenAIPageableListOfRunStep /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// 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. /// , or is null. - internal InternalOpenAIPageableListOfRunStep(IEnumerable data, string firstId, string lastId, bool hasMore) + internal OpenAIPageableListOfRunStep(IEnumerable data, string firstId, string lastId, bool hasMore) { Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNull(firstId, nameof(firstId)); @@ -64,14 +64,14 @@ internal InternalOpenAIPageableListOfRunStep(IEnumerable data, string f HasMore = hasMore; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The object type, which is always list. /// The requested list of items. /// The first ID represented in this list. /// The last ID represented in this list. /// A value indicating whether there are additional values available not captured in this list. /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfRunStep(OpenAIPageableListOfRunStepObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal OpenAIPageableListOfRunStep(OpenAIPageableListOfRunStepObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) { Object = @object; Data = data; @@ -81,8 +81,8 @@ internal InternalOpenAIPageableListOfRunStep(OpenAIPageableListOfRunStepObject @ _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfRunStep() + /// Initializes a new instance of for deserialization. + internal OpenAIPageableListOfRunStep() { } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfRunStepObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStepObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfRunStepObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStepObject.cs index 5e8c1a1ffd1a..5d44f56612c7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfRunStepObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfRunStepObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The OpenAIPageableListOfRunStep_object. internal readonly partial struct OpenAIPageableListOfRunStepObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.Serialization.cs similarity index 72% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.Serialization.cs index d7cf25b98288..d189b34aa3b5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - internal partial class InternalOpenAIPageableListOfAgent : IUtf8JsonSerializable, IJsonModel + internal partial class OpenAIPageableListOfThreadMessage : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfAgent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadMessage)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalOpenAIPageableListOfAgent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIPageableListOfThreadMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfAgent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadMessage)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfAgent(document.RootElement, options); + return DeserializeOpenAIPageableListOfThreadMessage(document.RootElement, options); } - internal static InternalOpenAIPageableListOfAgent DeserializeInternalOpenAIPageableListOfAgent(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIPageableListOfThreadMessage DeserializeOpenAIPageableListOfThreadMessage(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,8 +86,8 @@ internal static InternalOpenAIPageableListOfAgent DeserializeInternalOpenAIPagea { return null; } - OpenAIPageableListOfAgentObject @object = default; - IReadOnlyList data = default; + OpenAIPageableListOfThreadMessageObject @object = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; @@ -97,15 +97,15 @@ internal static InternalOpenAIPageableListOfAgent DeserializeInternalOpenAIPagea { if (property.NameEquals("object"u8)) { - @object = new OpenAIPageableListOfAgentObject(property.Value.GetString()); + @object = new OpenAIPageableListOfThreadMessageObject(property.Value.GetString()); continue; } if (property.NameEquals("data"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(Agent.DeserializeAgent(item, options)); + array.Add(ThreadMessage.DeserializeThreadMessage(item, options)); } data = array; continue; @@ -131,7 +131,7 @@ internal static InternalOpenAIPageableListOfAgent DeserializeInternalOpenAIPagea } } serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfAgent( + return new OpenAIPageableListOfThreadMessage( @object, data, firstId, @@ -140,43 +140,43 @@ internal static InternalOpenAIPageableListOfAgent DeserializeInternalOpenAIPagea serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfAgent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadMessage)} does not support writing '{options.Format}' format."); } } - InternalOpenAIPageableListOfAgent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OpenAIPageableListOfThreadMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalOpenAIPageableListOfAgent(document.RootElement, options); + return DeserializeOpenAIPageableListOfThreadMessage(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfAgent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadMessage)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static InternalOpenAIPageableListOfAgent FromResponse(Response response) + internal static OpenAIPageableListOfThreadMessage FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalOpenAIPageableListOfAgent(document.RootElement); + return DeserializeOpenAIPageableListOfThreadMessage(document.RootElement); } /// Convert into a . diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.cs similarity index 81% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.cs index 7b92140f7189..42934c4b09f0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessage.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfThreadMessage + internal partial class OpenAIPageableListOfThreadMessage { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ internal partial class InternalOpenAIPageableListOfThreadMessage /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// 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. /// , or is null. - internal InternalOpenAIPageableListOfThreadMessage(IEnumerable data, string firstId, string lastId, bool hasMore) + internal OpenAIPageableListOfThreadMessage(IEnumerable data, string firstId, string lastId, bool hasMore) { Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNull(firstId, nameof(firstId)); @@ -64,14 +64,14 @@ internal InternalOpenAIPageableListOfThreadMessage(IEnumerable da HasMore = hasMore; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The object type, which is always list. /// The requested list of items. /// The first ID represented in this list. /// The last ID represented in this list. /// A value indicating whether there are additional values available not captured in this list. /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfThreadMessage(OpenAIPageableListOfThreadMessageObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal OpenAIPageableListOfThreadMessage(OpenAIPageableListOfThreadMessageObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) { Object = @object; Data = data; @@ -81,8 +81,8 @@ internal InternalOpenAIPageableListOfThreadMessage(OpenAIPageableListOfThreadMes _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfThreadMessage() + /// Initializes a new instance of for deserialization. + internal OpenAIPageableListOfThreadMessage() { } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadMessageObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessageObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadMessageObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessageObject.cs index 6731097a1547..5519c6d9b891 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadMessageObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadMessageObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The OpenAIPageableListOfThreadMessage_object. internal readonly partial struct OpenAIPageableListOfThreadMessageObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.Serialization.cs similarity index 70% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.Serialization.cs index d9488ef81b21..2f9d7bd78f6c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - internal partial class InternalOpenAIPageableListOfThreadRun : IUtf8JsonSerializable, IJsonModel + internal partial class OpenAIPageableListOfThreadRun : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writ /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadRun)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadRun)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalOpenAIPageableListOfThreadRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIPageableListOfThreadRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadRun)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadRun)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfThreadRun(document.RootElement, options); + return DeserializeOpenAIPageableListOfThreadRun(document.RootElement, options); } - internal static InternalOpenAIPageableListOfThreadRun DeserializeInternalOpenAIPageableListOfThreadRun(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIPageableListOfThreadRun DeserializeOpenAIPageableListOfThreadRun(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -131,7 +131,7 @@ internal static InternalOpenAIPageableListOfThreadRun DeserializeInternalOpenAIP } } serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfThreadRun( + return new OpenAIPageableListOfThreadRun( @object, data, firstId, @@ -140,43 +140,43 @@ internal static InternalOpenAIPageableListOfThreadRun DeserializeInternalOpenAIP serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadRun)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadRun)} does not support writing '{options.Format}' format."); } } - InternalOpenAIPageableListOfThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OpenAIPageableListOfThreadRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalOpenAIPageableListOfThreadRun(document.RootElement, options); + return DeserializeOpenAIPageableListOfThreadRun(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadRun)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfThreadRun)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static InternalOpenAIPageableListOfThreadRun FromResponse(Response response) + internal static OpenAIPageableListOfThreadRun FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalOpenAIPageableListOfThreadRun(document.RootElement); + return DeserializeOpenAIPageableListOfThreadRun(document.RootElement); } /// Convert into a . diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.cs similarity index 82% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.cs index 92d7bde1e0e7..bc309466f1b5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRun.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfThreadRun + internal partial class OpenAIPageableListOfThreadRun { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ internal partial class InternalOpenAIPageableListOfThreadRun /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// 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. /// , or is null. - internal InternalOpenAIPageableListOfThreadRun(IEnumerable data, string firstId, string lastId, bool hasMore) + internal OpenAIPageableListOfThreadRun(IEnumerable data, string firstId, string lastId, bool hasMore) { Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNull(firstId, nameof(firstId)); @@ -64,14 +64,14 @@ internal InternalOpenAIPageableListOfThreadRun(IEnumerable data, stri HasMore = hasMore; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The object type, which is always list. /// The requested list of items. /// The first ID represented in this list. /// The last ID represented in this list. /// A value indicating whether there are additional values available not captured in this list. /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfThreadRun(OpenAIPageableListOfThreadRunObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal OpenAIPageableListOfThreadRun(OpenAIPageableListOfThreadRunObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) { Object = @object; Data = data; @@ -81,8 +81,8 @@ internal InternalOpenAIPageableListOfThreadRun(OpenAIPageableListOfThreadRunObje _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfThreadRun() + /// Initializes a new instance of for deserialization. + internal OpenAIPageableListOfThreadRun() { } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadRunObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRunObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadRunObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRunObject.cs index 3a2f9d250bb6..f6af66a3f2ea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadRunObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfThreadRunObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The OpenAIPageableListOfThreadRun_object. internal readonly partial struct OpenAIPageableListOfThreadRunObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.Serialization.cs similarity index 69% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.Serialization.cs index c8281309bb31..9146c4f2227f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - public partial class AgentPageableListOfVectorStore : IUtf8JsonSerializable, IJsonModel + public partial class OpenAIPageableListOfVectorStore : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStore)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStore)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AgentPageableListOfVectorStore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIPageableListOfVectorStore IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStore)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStore)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentPageableListOfVectorStore(document.RootElement, options); + return DeserializeOpenAIPageableListOfVectorStore(document.RootElement, options); } - internal static AgentPageableListOfVectorStore DeserializeAgentPageableListOfVectorStore(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIPageableListOfVectorStore DeserializeOpenAIPageableListOfVectorStore(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,7 +86,7 @@ internal static AgentPageableListOfVectorStore DeserializeAgentPageableListOfVec { return null; } - AgentPageableListOfVectorStoreObject @object = default; + OpenAIPageableListOfVectorStoreObject @object = default; IReadOnlyList data = default; string firstId = default; string lastId = default; @@ -97,7 +97,7 @@ internal static AgentPageableListOfVectorStore DeserializeAgentPageableListOfVec { if (property.NameEquals("object"u8)) { - @object = new AgentPageableListOfVectorStoreObject(property.Value.GetString()); + @object = new OpenAIPageableListOfVectorStoreObject(property.Value.GetString()); continue; } if (property.NameEquals("data"u8)) @@ -131,7 +131,7 @@ internal static AgentPageableListOfVectorStore DeserializeAgentPageableListOfVec } } serializedAdditionalRawData = rawDataDictionary; - return new AgentPageableListOfVectorStore( + return new OpenAIPageableListOfVectorStore( @object, data, firstId, @@ -140,43 +140,43 @@ internal static AgentPageableListOfVectorStore DeserializeAgentPageableListOfVec serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStore)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStore)} does not support writing '{options.Format}' format."); } } - AgentPageableListOfVectorStore IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OpenAIPageableListOfVectorStore IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAgentPageableListOfVectorStore(document.RootElement, options); + return DeserializeOpenAIPageableListOfVectorStore(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStore)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStore)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static AgentPageableListOfVectorStore FromResponse(Response response) + internal static OpenAIPageableListOfVectorStore FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeAgentPageableListOfVectorStore(document.RootElement); + return DeserializeOpenAIPageableListOfVectorStore(document.RootElement); } /// Convert into a . diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.cs similarity index 80% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.cs index 2ea6213ac2b7..4f5a7450732c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStore.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The response data for a requested list of items. - public partial class AgentPageableListOfVectorStore + public partial class OpenAIPageableListOfVectorStore { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ public partial class AgentPageableListOfVectorStore /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// 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. /// , or is null. - internal AgentPageableListOfVectorStore(IEnumerable data, string firstId, string lastId, bool hasMore) + internal OpenAIPageableListOfVectorStore(IEnumerable data, string firstId, string lastId, bool hasMore) { Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNull(firstId, nameof(firstId)); @@ -64,14 +64,14 @@ internal AgentPageableListOfVectorStore(IEnumerable data, string fi HasMore = hasMore; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The object type, which is always list. /// The requested list of items. /// The first ID represented in this list. /// The last ID represented in this list. /// A value indicating whether there are additional values available not captured in this list. /// Keeps track of any properties unknown to the library. - internal AgentPageableListOfVectorStore(AgentPageableListOfVectorStoreObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal OpenAIPageableListOfVectorStore(OpenAIPageableListOfVectorStoreObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) { Object = @object; Data = data; @@ -81,13 +81,13 @@ internal AgentPageableListOfVectorStore(AgentPageableListOfVectorStoreObject @ob _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AgentPageableListOfVectorStore() + /// Initializes a new instance of for deserialization. + internal OpenAIPageableListOfVectorStore() { } /// The object type, which is always list. - public AgentPageableListOfVectorStoreObject Object { get; } = AgentPageableListOfVectorStoreObject.List; + public OpenAIPageableListOfVectorStoreObject Object { get; } = OpenAIPageableListOfVectorStoreObject.List; /// The requested list of items. public IReadOnlyList Data { get; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.Serialization.cs similarity index 71% rename from sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.Serialization.cs index 712b0c7048cd..494696d51aca 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - internal partial class InternalOpenAIPageableListOfRunStep : IUtf8JsonSerializable, IJsonModel + public partial class OpenAIPageableListOfVectorStoreFile : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfRunStep)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStoreFile)} does not support writing '{format}' format."); } writer.WritePropertyName("object"u8); @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - InternalOpenAIPageableListOfRunStep IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OpenAIPageableListOfVectorStoreFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfRunStep)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStoreFile)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfRunStep(document.RootElement, options); + return DeserializeOpenAIPageableListOfVectorStoreFile(document.RootElement, options); } - internal static InternalOpenAIPageableListOfRunStep DeserializeInternalOpenAIPageableListOfRunStep(JsonElement element, ModelReaderWriterOptions options = null) + internal static OpenAIPageableListOfVectorStoreFile DeserializeOpenAIPageableListOfVectorStoreFile(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,8 +86,8 @@ internal static InternalOpenAIPageableListOfRunStep DeserializeInternalOpenAIPag { return null; } - OpenAIPageableListOfRunStepObject @object = default; - IReadOnlyList data = default; + OpenAIPageableListOfVectorStoreFileObject @object = default; + IReadOnlyList data = default; string firstId = default; string lastId = default; bool hasMore = default; @@ -97,15 +97,15 @@ internal static InternalOpenAIPageableListOfRunStep DeserializeInternalOpenAIPag { if (property.NameEquals("object"u8)) { - @object = new OpenAIPageableListOfRunStepObject(property.Value.GetString()); + @object = new OpenAIPageableListOfVectorStoreFileObject(property.Value.GetString()); continue; } if (property.NameEquals("data"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(RunStep.DeserializeRunStep(item, options)); + array.Add(VectorStoreFile.DeserializeVectorStoreFile(item, options)); } data = array; continue; @@ -131,7 +131,7 @@ internal static InternalOpenAIPageableListOfRunStep DeserializeInternalOpenAIPag } } serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfRunStep( + return new OpenAIPageableListOfVectorStoreFile( @object, data, firstId, @@ -140,43 +140,43 @@ internal static InternalOpenAIPageableListOfRunStep DeserializeInternalOpenAIPag serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfRunStep)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStoreFile)} does not support writing '{options.Format}' format."); } } - InternalOpenAIPageableListOfRunStep IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OpenAIPageableListOfVectorStoreFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalOpenAIPageableListOfRunStep(document.RootElement, options); + return DeserializeOpenAIPageableListOfVectorStoreFile(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfRunStep)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OpenAIPageableListOfVectorStoreFile)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static InternalOpenAIPageableListOfRunStep FromResponse(Response response) + internal static OpenAIPageableListOfVectorStoreFile FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalOpenAIPageableListOfRunStep(document.RootElement); + return DeserializeOpenAIPageableListOfVectorStoreFile(document.RootElement); } /// Convert into a . diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.cs similarity index 79% rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.cs index d8d7fdb4b541..cfe35460477d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFile.cs @@ -9,10 +9,10 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The response data for a requested list of items. - public partial class AgentPageableListOfVectorStoreFile + public partial class OpenAIPageableListOfVectorStoreFile { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ public partial class AgentPageableListOfVectorStoreFile /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// 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. /// , or is null. - internal AgentPageableListOfVectorStoreFile(IEnumerable data, string firstId, string lastId, bool hasMore) + internal OpenAIPageableListOfVectorStoreFile(IEnumerable data, string firstId, string lastId, bool hasMore) { Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNull(firstId, nameof(firstId)); @@ -64,14 +64,14 @@ internal AgentPageableListOfVectorStoreFile(IEnumerable data, s HasMore = hasMore; } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The object type, which is always list. /// The requested list of items. /// The first ID represented in this list. /// The last ID represented in this list. /// A value indicating whether there are additional values available not captured in this list. /// Keeps track of any properties unknown to the library. - internal AgentPageableListOfVectorStoreFile(AgentPageableListOfVectorStoreFileObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) + internal OpenAIPageableListOfVectorStoreFile(OpenAIPageableListOfVectorStoreFileObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) { Object = @object; Data = data; @@ -81,13 +81,13 @@ internal AgentPageableListOfVectorStoreFile(AgentPageableListOfVectorStoreFileOb _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AgentPageableListOfVectorStoreFile() + /// Initializes a new instance of for deserialization. + internal OpenAIPageableListOfVectorStoreFile() { } /// The object type, which is always list. - public AgentPageableListOfVectorStoreFileObject Object { get; } = AgentPageableListOfVectorStoreFileObject.List; + public OpenAIPageableListOfVectorStoreFileObject Object { get; } = OpenAIPageableListOfVectorStoreFileObject.List; /// The requested list of items. public IReadOnlyList Data { get; } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFileObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFileObject.cs new file mode 100644 index 000000000000..9747539ac996 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreFileObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The OpenAIPageableListOfVectorStoreFile_object. + public readonly partial struct OpenAIPageableListOfVectorStoreFileObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OpenAIPageableListOfVectorStoreFileObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ListValue = "list"; + + /// list. + public static OpenAIPageableListOfVectorStoreFileObject List { get; } = new OpenAIPageableListOfVectorStoreFileObject(ListValue); + /// Determines if two values are the same. + public static bool operator ==(OpenAIPageableListOfVectorStoreFileObject left, OpenAIPageableListOfVectorStoreFileObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OpenAIPageableListOfVectorStoreFileObject left, OpenAIPageableListOfVectorStoreFileObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OpenAIPageableListOfVectorStoreFileObject(string value) => new OpenAIPageableListOfVectorStoreFileObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OpenAIPageableListOfVectorStoreFileObject other && Equals(other); + /// + public bool Equals(OpenAIPageableListOfVectorStoreFileObject 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.Agents/src/Generated/OpenAIPageableListOfVectorStoreObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreObject.cs new file mode 100644 index 000000000000..c464a63b701c --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenAIPageableListOfVectorStoreObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The OpenAIPageableListOfVectorStore_object. + public readonly partial struct OpenAIPageableListOfVectorStoreObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OpenAIPageableListOfVectorStoreObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ListValue = "list"; + + /// list. + public static OpenAIPageableListOfVectorStoreObject List { get; } = new OpenAIPageableListOfVectorStoreObject(ListValue); + /// Determines if two values are the same. + public static bool operator ==(OpenAIPageableListOfVectorStoreObject left, OpenAIPageableListOfVectorStoreObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OpenAIPageableListOfVectorStoreObject left, OpenAIPageableListOfVectorStoreObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OpenAIPageableListOfVectorStoreObject(string value) => new OpenAIPageableListOfVectorStoreObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OpenAIPageableListOfVectorStoreObject other && Equals(other); + /// + public bool Equals(OpenAIPageableListOfVectorStoreObject 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/OpenApiAnonymousAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs index e2b9cdf54847..12629fa85b4a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class OpenApiAnonymousAuthDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAnonymousAuthDetails.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAnonymousAuthDetails.cs index 5a86750c6c95..c3273982ff4d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAnonymousAuthDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Security details for OpenApi anonymous authentication. public partial class OpenApiAnonymousAuthDetails : OpenApiAuthDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthDetails.Serialization.cs index 8d9043b1b4ba..199ecc27dfec 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthDetails.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownOpenApiAuthDetails))] public partial class OpenApiAuthDetails : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthDetails.cs index 596d594a2488..66ce24754e1a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// authentication details for OpenApiFunctionDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthType.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthType.cs index 230257cdbd7b..26a9d2c38c15 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiAuthType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// Authentication type for OpenApi endpoint. Allowed types are: diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs index 3594791bd427..daf0a1bcadeb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class OpenApiConnectionAuthDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionAuthDetails.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionAuthDetails.cs index 8c2771c0f3b9..d42105fc32fb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionAuthDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Security details for OpenApi connection authentication. public partial class OpenApiConnectionAuthDetails : OpenApiAuthDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs index 3587020a8867..1b7075e26811 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class OpenApiConnectionSecurityScheme : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionSecurityScheme.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionSecurityScheme.cs index d74d1bae8a27..480cd8c94eba 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiConnectionSecurityScheme.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Security scheme for OpenApi managed_identity authentication. public partial class OpenApiConnectionSecurityScheme diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiFunctionDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiFunctionDefinition.Serialization.cs index 52bd220dc908..42431dc0df22 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiFunctionDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class OpenApiFunctionDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiFunctionDefinition.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiFunctionDefinition.cs index 8980b1cfe70e..818c22f55a04 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiFunctionDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for an openapi function. public partial class OpenApiFunctionDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedAuthDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedAuthDetails.Serialization.cs index 6f05aaf2f05c..a52e832ab4ef 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedAuthDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class OpenApiManagedAuthDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedAuthDetails.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedAuthDetails.cs index 9a51a510225c..0724e22ed4d8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedAuthDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Security details for OpenApi managed_identity authentication. public partial class OpenApiManagedAuthDetails : OpenApiAuthDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs index 61a1375c0007..f2a6521b2cea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class OpenApiManagedSecurityScheme : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedSecurityScheme.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedSecurityScheme.cs index e1c3d9970098..c43371a3d983 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiManagedSecurityScheme.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Security scheme for OpenApi managed_identity authentication. public partial class OpenApiManagedSecurityScheme diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiToolDefinition.Serialization.cs index bd31655d48ab..4b5af52d71a6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class OpenApiToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiToolDefinition.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/OpenApiToolDefinition.cs index f56708e3d6e5..0f5b089d1590 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/OpenApiToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for an OpenAPI tool as used to configure an agent. public partial class OpenApiToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredAction.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RequiredAction.Serialization.cs index 139d6a087e8f..d6fc0625a0be 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredAction.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRequiredAction))] public partial class RequiredAction : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredAction.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RequiredAction.cs index 8233fd69673e..2cb9d5a5c1bf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredAction.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of a required action for an agent thread run to continue. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredFunctionToolCall.Serialization.cs similarity index 96% rename from sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RequiredFunctionToolCall.Serialization.cs index b0b9fd3175fa..cbbc926d5f80 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredFunctionToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RequiredFunctionToolCall : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("function"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); } RequiredFunctionToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -60,8 +60,8 @@ internal static RequiredFunctionToolCall DeserializeRequiredFunctionToolCall(Jso return null; } InternalRequiredFunctionToolCallDetails function = default; - string id = default; string type = default; + string id = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -71,14 +71,14 @@ internal static RequiredFunctionToolCall DeserializeRequiredFunctionToolCall(Jso function = InternalRequiredFunctionToolCallDetails.DeserializeInternalRequiredFunctionToolCallDetails(property.Value, options); continue; } - if (property.NameEquals("id"u8)) + if (property.NameEquals("type"u8)) { - id = property.Value.GetString(); + type = property.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("id"u8)) { - type = property.Value.GetString(); + id = property.Value.GetString(); continue; } if (options.Format != "W") @@ -87,7 +87,7 @@ internal static RequiredFunctionToolCall DeserializeRequiredFunctionToolCall(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new RequiredFunctionToolCall(type, serializedAdditionalRawData, id, function); + return new RequiredFunctionToolCall(type, id, serializedAdditionalRawData, function); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredFunctionToolCall.cs similarity index 79% rename from sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RequiredFunctionToolCall.cs index 259b963338fe..faf8a9d95b7a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredFunctionToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A representation of a requested call to a function tool, needed by the model to continue evaluation of a run. public partial class RequiredFunctionToolCall : RequiredToolCall @@ -22,15 +22,16 @@ internal RequiredFunctionToolCall(string id, InternalRequiredFunctionToolCallDet Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(internalDetails, nameof(internalDetails)); + Type = "function"; InternalDetails = internalDetails; } /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. + /// The object type for the required tool call. /// The ID of the tool call. This ID must be referenced when submitting tool outputs. + /// Keeps track of any properties unknown to the library. /// Detailed information about the function to be executed by the tool that includes name and arguments. - internal RequiredFunctionToolCall(string type, IDictionary serializedAdditionalRawData, string id, InternalRequiredFunctionToolCallDetails internalDetails) : base(type, serializedAdditionalRawData, id) + internal RequiredFunctionToolCall(string type, string id, IDictionary serializedAdditionalRawData, InternalRequiredFunctionToolCallDetails internalDetails) : base(type, id, serializedAdditionalRawData) { InternalDetails = internalDetails; } @@ -39,5 +40,8 @@ internal RequiredFunctionToolCall(string type, IDictionary s internal RequiredFunctionToolCall() { } + + /// Detailed information about the function to be executed by the tool that includes name and arguments. + public InternalRequiredFunctionToolCallDetails InternalDetails { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredToolCall.Serialization.cs similarity index 84% rename from sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RequiredToolCall.Serialization.cs index 27df8407d870..10016f766cf3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredToolCall.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRequiredToolCall))] public partial class RequiredToolCall : IUtf8JsonSerializable, IJsonModel @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter /// The JSON writer. /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,9 +34,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RequiredToolCall)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } } RequiredToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -102,14 +118,14 @@ RequiredToolCall IPersistableModel.Create(BinaryData data, Mod /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new RequiredToolCall FromResponse(Response response) + internal static RequiredToolCall FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); return DeserializeRequiredToolCall(document.RootElement); } /// Convert into a . - internal override RequestContent ToRequestContent() + internal virtual RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/RequiredToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredToolCall.cs new file mode 100644 index 000000000000..58d8aa2854b5 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RequiredToolCall.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents +{ + /// + /// An abstract representation of a tool invocation needed by the model to continue a run. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class RequiredToolCall + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when submitting tool outputs. + /// is null. + protected RequiredToolCall(string id) + { + Argument.AssertNotNull(id, nameof(id)); + + Id = id; + } + + /// Initializes a new instance of . + /// The object type for the required tool call. + /// The ID of the tool call. This ID must be referenced when submitting tool outputs. + /// Keeps track of any properties unknown to the library. + internal RequiredToolCall(string type, string id, IDictionary serializedAdditionalRawData) + { + Type = type; + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RequiredToolCall() + { + } + + /// The object type for the required tool call. + internal string Type { get; set; } + /// The ID of the tool call. This ID must be referenced when submitting tool outputs. + public string Id { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormat.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormat.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormat.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormat.cs index f14f7bea0d8c..173b0361c113 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormat.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormat.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Possible API response formats. public readonly partial struct ResponseFormat : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchema.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchema.Serialization.cs index 144d1f5cc3c9..1afbd273819a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchema.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ResponseFormatJsonSchema : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchema.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchema.cs index 27c3e21c9b57..d2d300c7612a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchema.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A description of what the response format is for, used by the model to determine how to respond in the format. public partial class ResponseFormatJsonSchema diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs index 300b7e32b9cf..81f387324aaa 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ResponseFormatJsonSchemaType : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaType.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaType.cs index 8d0f76332659..6b9c00b8301b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaType.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The type of response format being defined: `json_schema`. public partial class ResponseFormatJsonSchemaType diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaTypeType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaTypeType.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaTypeType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaTypeType.cs index c9c0b85cb3ec..ed27ef02f7fb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaTypeType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ResponseFormatJsonSchemaTypeType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The ResponseFormatJsonSchemaType_type. public readonly partial struct ResponseFormatJsonSchemaTypeType : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunAdditionalFieldList.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunAdditionalFieldList.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunAdditionalFieldList.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunAdditionalFieldList.cs index 897785c4c0b9..7650a3fb5365 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunAdditionalFieldList.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunAdditionalFieldList.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A list of additional fields to include in the response. public readonly partial struct RunAdditionalFieldList : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunCompletionUsage.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunCompletionUsage.Serialization.cs index 8e9afbb956af..9e2941fd4b4f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunCompletionUsage.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunCompletionUsage : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunCompletionUsage.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunCompletionUsage.cs index 06340645c52d..e3118d3e4153 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunCompletionUsage.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). public partial class RunCompletionUsage diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunError.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunError.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunError.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunError.Serialization.cs index 36f579ae3e6f..045c6777e6d4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunError.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunError.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunError : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunError.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunError.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunError.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunError.cs index 1593311d899a..037b751bedff 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunError.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunError.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The details of an error as encountered by an agent thread run. public partial class RunError diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStatus.cs index 4abba05c525d..c488647bf25a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStatus.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Possible values for the status of an agent thread run. public readonly partial struct RunStatus : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStep.Serialization.cs similarity index 90% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStep.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStep.Serialization.cs index df98541cdb27..91c485199a84 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStep.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStep : IUtf8JsonSerializable, IJsonModel { @@ -37,11 +37,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); + writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("type"u8); writer.WriteStringValue(Type.ToString()); writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WriteStringValue(AgentId); writer.WritePropertyName("thread_id"u8); writer.WriteStringValue(ThreadId); writer.WritePropertyName("run_id"u8); @@ -162,7 +162,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite return null; } string id = default; - string @object = default; + RunStepObject @object = default; RunStepType type = default; string assistantId = default; string threadId = default; @@ -188,7 +188,7 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite } if (property.NameEquals("object"u8)) { - @object = property.Value.GetString(); + @object = new RunStepObject(property.Value.GetString()); continue; } if (property.NameEquals("type"u8)) @@ -238,22 +238,42 @@ internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWrite } if (property.NameEquals("expired_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref expiredAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + expiredAt = null; + continue; + } + expiredAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("completed_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref completedAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + completedAt = null; + continue; + } + completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("cancelled_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref cancelledAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + cancelledAt = null; + continue; + } + cancelledAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("failed_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref failedAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + failedAt = null; + continue; + } + failedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("usage"u8)) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStep.cs similarity index 87% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStep.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStep.cs index 6d403877ed00..1e652d6d511e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStep.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Detailed information about a single step of an agent thread run. public partial class RunStep @@ -48,7 +48,7 @@ public partial class RunStep /// Initializes a new instance of . /// The identifier, which can be referenced in API endpoints. /// The type of run step, which can be either message_creation or tool_calls. - /// The ID of the agent associated with the run step. + /// The ID of the agent associated with the run step. /// The ID of the thread that was run. /// The ID of the run that this run step is a part of. /// The status of this run step. @@ -64,18 +64,18 @@ public partial class RunStep /// The Unix timestamp, in seconds, representing when this was cancelled. /// The Unix timestamp, in seconds, representing when this failed. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// , , , or is null. - internal RunStep(string id, RunStepType type, string assistantId, string threadId, string runId, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset createdAt, DateTimeOffset? expiredAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IReadOnlyDictionary metadata) + /// , , , or is null. + internal RunStep(string id, RunStepType type, string agentId, string threadId, string runId, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset createdAt, DateTimeOffset? expiredAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IReadOnlyDictionary metadata) { Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(runId, nameof(runId)); Argument.AssertNotNull(stepDetails, nameof(stepDetails)); Id = id; Type = type; - AssistantId = assistantId; + AgentId = agentId; ThreadId = threadId; RunId = runId; Status = status; @@ -93,7 +93,7 @@ internal RunStep(string id, RunStepType type, string assistantId, string threadI /// The identifier, which can be referenced in API endpoints. /// The object type, which is always 'thread.run.step'. /// The type of run step, which can be either message_creation or tool_calls. - /// The ID of the agent associated with the run step. + /// The ID of the agent associated with the run step. /// The ID of the thread that was run. /// The ID of the run that this run step is a part of. /// The status of this run step. @@ -111,12 +111,12 @@ internal RunStep(string id, RunStepType type, string assistantId, string threadI /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Keeps track of any properties unknown to the library. - internal RunStep(string id, string @object, RunStepType type, string assistantId, string threadId, string runId, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset createdAt, DateTimeOffset? expiredAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, RunStepCompletionUsage usage, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal RunStep(string id, RunStepObject @object, RunStepType type, string agentId, string threadId, string runId, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset createdAt, DateTimeOffset? expiredAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, RunStepCompletionUsage usage, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) { Id = id; Object = @object; Type = type; - AssistantId = assistantId; + AgentId = agentId; ThreadId = threadId; RunId = runId; Status = status; @@ -139,11 +139,13 @@ internal RunStep() /// The identifier, which can be referenced in API endpoints. public string Id { get; } + /// The object type, which is always 'thread.run.step'. + public RunStepObject Object { get; } = RunStepObject.ThreadRunStep; /// The type of run step, which can be either message_creation or tool_calls. public RunStepType Type { get; } /// The ID of the agent associated with the run step. - public string AssistantId { get; } + public string AgentId { get; } /// The ID of the thread that was run. public string ThreadId { get; } /// The ID of the run that this run step is a part of. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs index 7b622e738208..6d4b83cd89fb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepAzureAISearchToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepAzureAISearchToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepAzureAISearchToolCall.cs index 6b31eced4af0..d31b20bd7f1c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepAzureAISearchToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A record of a call to an Azure AI Search tool, issued by the model in evaluation of a defined tool, that represents diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepBingGroundingToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepBingGroundingToolCall.Serialization.cs index ec9f325fa294..3577cc96c776 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepBingGroundingToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepBingGroundingToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepBingGroundingToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepBingGroundingToolCall.cs index 4b3e0c055278..66d890002b27 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepBingGroundingToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A record of a call to a bing grounding tool, issued by the model in evaluation of a defined tool, that represents diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs index 94cc2afd74c4..892226404555 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs @@ -11,9 +11,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - public partial class RunStepCodeInterpreterImageOutput : IUtf8JsonSerializable, IJsonModel + internal partial class RunStepCodeInterpreterImageOutput : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageOutput.cs similarity index 93% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageOutput.cs index 1b78e4af0233..13b638e15c50 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageOutput.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A representation of an image output emitted by a code interpreter tool in response to a tool call by the model. - public partial class RunStepCodeInterpreterImageOutput : RunStepCodeInterpreterToolCallOutput + internal partial class RunStepCodeInterpreterImageOutput : RunStepCodeInterpreterToolCallOutput { /// Initializes a new instance of . /// Referential information for the image associated with this output. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs index aafcc6251c0d..18a5b9894963 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs @@ -11,9 +11,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - public partial class RunStepCodeInterpreterImageReference : IUtf8JsonSerializable, IJsonModel + internal partial class RunStepCodeInterpreterImageReference : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageReference.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageReference.cs index aaed08a5c03a..5cba2b0ca4a4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterImageReference.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// An image reference emitted by a code interpreter tool in response to a tool call by the model. - public partial class RunStepCodeInterpreterImageReference + internal partial class RunStepCodeInterpreterImageReference { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs index d186e1ad8f8f..ef947daf4310 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs @@ -11,9 +11,9 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { - public partial class RunStepCodeInterpreterLogOutput : IUtf8JsonSerializable, IJsonModel + internal partial class RunStepCodeInterpreterLogOutput : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterLogOutput.cs similarity index 93% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterLogOutput.cs index 84a3a237427f..0597d143f4fd 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterLogOutput.cs @@ -8,10 +8,10 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A representation of a log output emitted by a code interpreter tool in response to a tool call by the model. - public partial class RunStepCodeInterpreterLogOutput : RunStepCodeInterpreterToolCallOutput + internal partial class RunStepCodeInterpreterLogOutput : RunStepCodeInterpreterToolCallOutput { /// Initializes a new instance of . /// The serialized log output emitted by the code interpreter. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs index 17bf9141f88d..4ff1e7c18919 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepCodeInterpreterToolCall : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); } RunStepCodeInterpreterToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCall.cs similarity index 92% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCall.cs index 9c834e3d74d1..87aeba9d033b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A record of a call to a code interpreter tool, issued by the model in evaluation of a defined tool, that @@ -43,5 +43,8 @@ internal RunStepCodeInterpreterToolCall(string type, string id, IDictionary The details of the tool call to the code interpreter tool. + public InternalCodeInterpreterToolCallDetails InternalDetails { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs index 68f548899933..d89a9a679f9d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs @@ -10,10 +10,10 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRunStepCodeInterpreterToolCallOutput))] - public partial class RunStepCodeInterpreterToolCallOutput : IUtf8JsonSerializable, IJsonModel + internal partial class RunStepCodeInterpreterToolCallOutput : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCallOutput.cs similarity index 96% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCallOutput.cs index 95cd5d808144..cc128b0230d3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCodeInterpreterToolCallOutput.cs @@ -8,14 +8,14 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of an emitted output from a code interpreter tool. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - public abstract partial class RunStepCodeInterpreterToolCallOutput + internal abstract partial class RunStepCodeInterpreterToolCallOutput { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCompletionUsage.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCompletionUsage.Serialization.cs index 30c33915ed33..9cd75a341e15 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCompletionUsage.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepCompletionUsage : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCompletionUsage.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepCompletionUsage.cs index 6750fa1223c1..7b206e1865d2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepCompletionUsage.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Usage statistics related to the run step. public partial class RunStepCompletionUsage diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDelta.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDelta.Serialization.cs index 41df1f3c90b7..7608a43883f5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDelta.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDelta : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDelta.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDelta.cs index 0f601698841d..c983886233ca 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDelta.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the delta payload in a streaming run step delta chunk. public partial class RunStepDelta diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunk.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunk.Serialization.cs index bd86667370fc..7d3f6b82fbbf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunk.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaChunk : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunk.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunk.cs index bd48db51e72c..af1955b63598 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunk.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a run step delta i.e. any changed fields on a run step during streaming. public partial class RunStepDeltaChunk diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunkObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunkObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunkObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunkObject.cs index 3f217f543661..af90662b2d9f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunkObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaChunkObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The RunStepDeltaChunk_object. public readonly partial struct RunStepDeltaChunkObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs index 2d242dc345aa..facfecb03d37 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaCodeInterpreterDetailItemObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs index a76ab9ec7a09..a4316e04afa4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the Code Interpreter tool call data in a streaming run step's tool calls. public partial class RunStepDeltaCodeInterpreterDetailItemObject diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs index 338949150f43..7479baf5f19f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaCodeInterpreterImageOutput : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs index de128c6b8688..9e2bfc8bd2c8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents an image output as produced the Code interpreter tool and as represented in a streaming run step's delta tool calls collection. public partial class RunStepDeltaCodeInterpreterImageOutput : RunStepDeltaCodeInterpreterOutput diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs index ede94b51ecb9..a3c2d6ae2269 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaCodeInterpreterImageOutputObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs index 8089067be9d7..09d9a6f65976 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the data for a streaming run step's Code Interpreter tool call image output. public partial class RunStepDeltaCodeInterpreterImageOutputObject diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs index f280d68e3eb7..bd9d149274ab 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaCodeInterpreterLogOutput : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs index 31f3284b073f..2ea4286839df 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a log output as produced by the Code Interpreter tool and as represented in a streaming run step's delta tool calls collection. public partial class RunStepDeltaCodeInterpreterLogOutput : RunStepDeltaCodeInterpreterOutput diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs index 2acd096c6a7e..578af7a30d82 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRunStepDeltaCodeInterpreterOutput))] public partial class RunStepDeltaCodeInterpreterOutput : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterOutput.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterOutput.cs index 656ea7ded2c3..d2786db53e07 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterOutput.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// The abstract base representation of a streaming run step tool call's Code Interpreter tool output. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs index 3b5ed2399820..35606b1041eb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaCodeInterpreterToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs index 8483fa22d47f..4b8177dc66e3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a Code Interpreter tool call within a streaming run step's tool call details. public partial class RunStepDeltaCodeInterpreterToolCall : RunStepDeltaToolCall diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaDetail.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaDetail.Serialization.cs index bdbed54464d4..28f8992a59ce 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaDetail.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRunStepDeltaDetail))] public partial class RunStepDeltaDetail : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaDetail.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaDetail.cs index 68de601fb537..d6a7dc8ee92e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaDetail.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// Represents a single run step detail item in a streaming run step's delta payload. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs index 3c5eb568c16b..2c4c40003e4f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaFileSearchToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFileSearchToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFileSearchToolCall.cs index 4c39bc5e2ad2..3162d3deae39 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFileSearchToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a file search tool call within a streaming run step's tool call details. public partial class RunStepDeltaFileSearchToolCall : RunStepDeltaToolCall diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunction.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunction.Serialization.cs index 6c735eb7a2e5..c0f037f21f9c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunction.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaFunction : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunction.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunction.cs index 70f21095badd..849214279437 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunction.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the function data in a streaming run step delta's function tool call. public partial class RunStepDeltaFunction diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs index b22a5a375395..4cd58bd8d5da 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaFunctionToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunctionToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunctionToolCall.cs index 1347a2ce39bf..0d0de9fda156 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaFunctionToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a function tool call within a streaming run step's tool call details. public partial class RunStepDeltaFunctionToolCall : RunStepDeltaToolCall diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreation.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreation.Serialization.cs index 5183116f4261..5829f0ed6ad5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreation.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaMessageCreation : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreation.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreation.cs index c455f5326917..aac8e8a1eea2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreation.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents a message creation within a streaming run step delta. public partial class RunStepDeltaMessageCreation : RunStepDeltaDetail diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs index c9a526ba9412..db6a96433231 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaMessageCreationObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreationObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreationObject.cs index 076a5a1114fc..af8d2834ebbc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaMessageCreationObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents the data within a streaming run step message creation response object. public partial class RunStepDeltaMessageCreationObject diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCall.Serialization.cs index ffe44e8ef464..381c021804b1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCall.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRunStepDeltaToolCall))] public partial class RunStepDeltaToolCall : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCall.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCall.cs index 198aae90f407..2e75472af0f4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// The abstract base representation of a single tool call within a streaming run step's delta tool call details. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCallObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCallObject.Serialization.cs index 01ec769d0882..40188456d1a1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCallObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepDeltaToolCallObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCallObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCallObject.cs index 5778fcda8a0b..b656edc87c0c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDeltaToolCallObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Represents an invocation of tool calls as part of a streaming run step. public partial class RunStepDeltaToolCallObject : RunStepDeltaDetail diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDetails.Serialization.cs index e281232995e6..e2436534c61f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDetails.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRunStepDetails))] public partial class RunStepDetails : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepDetails.cs index 872475195344..43c4f88e9c0c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of the details for a run step. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepError.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepError.Serialization.cs index 2cbcbf72a07c..1c0dd1903641 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepError.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepError : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepError.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepError.cs index 0980299543a5..522fc363261d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepError.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The error information associated with a failed run step. public partial class RunStepError diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepErrorCode.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepErrorCode.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepErrorCode.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepErrorCode.cs index fc048aa38575..33ec7cdd6680 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepErrorCode.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepErrorCode.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Possible error code values attributable to a failed run step. public readonly partial struct RunStepErrorCode : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCall.Serialization.cs index 139b47198ef6..1c806a93354a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepFileSearchToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCall.cs index aec381fb6c39..38726c11eff8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A record of a call to a file search tool, issued by the model in evaluation of a defined tool, that represents diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs index 4d06273c1629..6c553c4fa4fc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepFileSearchToolCallResult : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResult.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResult.cs index fd13ac0486e5..9357a536d7ac 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResult.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// File search tool call result. public partial class RunStepFileSearchToolCallResult diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs index 32c40c6da15c..4a1de78edb70 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepFileSearchToolCallResults : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResults.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResults.cs index 087a283ebaea..121f49d72de8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFileSearchToolCallResults.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The results of the file search. public partial class RunStepFileSearchToolCallResults diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFunctionToolCall.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFunctionToolCall.Serialization.cs index 1aa85bf4ad84..c394aefe7549 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFunctionToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepFunctionToolCall : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("function"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); } RunStepFunctionToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFunctionToolCall.cs similarity index 91% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepFunctionToolCall.cs index 7791557ae4a2..01eec58adfb9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepFunctionToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A record of a call to a function tool, issued by the model in evaluation of a defined tool, that represents the inputs @@ -43,5 +43,8 @@ internal RunStepFunctionToolCall(string type, string id, IDictionary The detailed information about the function called by the model. + public InternalRunStepFunctionToolCallDetails InternalDetails { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationDetails.Serialization.cs index f540dee265f4..beb50b6924ef 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepMessageCreationDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationDetails.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationDetails.cs index ded89f984e4e..80f4b00259bb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The detailed information associated with a message creation run step. public partial class RunStepMessageCreationDetails : RunStepDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationReference.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationReference.Serialization.cs index 60ffad968d2d..5a7e8c8e45bf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationReference.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepMessageCreationReference : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationReference.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationReference.cs index dbedc9a28ab6..3bb5ea28ea0f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMessageCreationReference.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The details of a message created as a part of a run step. public partial class RunStepMessageCreationReference diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs index 1b3f42907d65..b76ae27af3e4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepMicrosoftFabricToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMicrosoftFabricToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepMicrosoftFabricToolCall.cs index b212127c0605..7dbfe3720c70 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepMicrosoftFabricToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A record of a call to a Microsoft Fabric tool, issued by the model in evaluation of a defined tool, that represents diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/RunStepObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepObject.cs new file mode 100644 index 000000000000..6cd7a7e0bb1e --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The RunStep_object. + public readonly partial struct RunStepObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RunStepObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ThreadRunStepValue = "thread.run.step"; + + /// thread.run.step. + public static RunStepObject ThreadRunStep { get; } = new RunStepObject(ThreadRunStepValue); + /// Determines if two values are the same. + public static bool operator ==(RunStepObject left, RunStepObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RunStepObject left, RunStepObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RunStepObject(string value) => new RunStepObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RunStepObject other && Equals(other); + /// + public bool Equals(RunStepObject 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/RunStepSharepointToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepSharepointToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepSharepointToolCall.Serialization.cs index d92dd8db04f3..807f733e5d73 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepSharepointToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepSharepointToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepSharepointToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepSharepointToolCall.cs index 3efabae62b69..2d9fa8521797 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepSharepointToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A record of a call to a SharePoint tool, issued by the model in evaluation of a defined tool, that represents diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepStatus.cs index f71c99e16db9..4d0bfda6637d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepStatus.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Possible values for the status of a run step. public readonly partial struct RunStepStatus : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStreamEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepStreamEvent.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepStreamEvent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepStreamEvent.cs index 423b575c14a9..3531b771b553 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepStreamEvent.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Run step operation related streaming events. public readonly partial struct RunStepStreamEvent : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCall.Serialization.cs index 6eb859182a42..77419dd2b3fc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCall.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownRunStepToolCall))] public partial class RunStepToolCall : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCall.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCall.cs index 7b77b862d1a2..1321e32d9231 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of a detailed tool call as recorded within a run step for an existing run. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCallDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCallDetails.Serialization.cs index 89008b24b6cd..0c83ce3fe77d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCallDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class RunStepToolCallDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCallDetails.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCallDetails.cs index f734d2d76efe..fd1b67b8831d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepToolCallDetails.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The detailed information associated with a run step calling tools. public partial class RunStepToolCallDetails : RunStepDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepType.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStepType.cs index b3e4153be1e9..dcfaef382209 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStepType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The possible types of run steps. public readonly partial struct RunStepType : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/RunStreamEvent.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/RunStreamEvent.cs index b3fd0dcab2ef..99f28b1aaede 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/RunStreamEvent.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Run operation related streaming events. public readonly partial struct RunStreamEvent : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/SharepointToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/SharepointToolDefinition.Serialization.cs index b35644b40cab..d72d81ecfbeb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/SharepointToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class SharepointToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/SharepointToolDefinition.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/SharepointToolDefinition.cs index 45c89ce5271f..59d58b1a9e7d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/SharepointToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The input definition information for a sharepoint tool as used to configure an agent. public partial class SharepointToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsAction.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsAction.Serialization.cs index b2b794389e59..13b473b6708c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsAction.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class SubmitToolOutputsAction : IUtf8JsonSerializable, IJsonModel { @@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("submit_tool_outputs"u8); - writer.WriteObjectValue(InternalDetails, options); + writer.WriteObjectValue(InternalDetails, options); } SubmitToolOutputsAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.cs b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsAction.cs similarity index 90% rename from sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsAction.cs index 55b71a82960e..35fa70ee1891 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsAction.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The details for required tool calls that must be submitted for an agent thread run to continue. public partial class SubmitToolOutputsAction : RequiredAction @@ -37,5 +37,8 @@ internal SubmitToolOutputsAction(string type, IDictionary se internal SubmitToolOutputsAction() { } + + /// The details describing tools that should be called to submit tool outputs. + public InternalSubmitToolOutputsDetails InternalDetails { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs index c3be529222ed..09d3dd80d58c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class SubmitToolOutputsToRunRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsToRunRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsToRunRequest.cs index ce70a43ea179..23cd483cf3cf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/SubmitToolOutputsToRunRequest.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The SubmitToolOutputsToRunRequest. internal partial class SubmitToolOutputsToRunRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatus.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatus.Serialization.cs index 5e6467592b69..b86d4ef02f43 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatus.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class ThreadDeletionStatus : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatus.cs index 5b2792458b1c..83315490d2ff 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatus.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The status of a thread deletion operation. internal partial class ThreadDeletionStatus diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatusObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatusObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatusObject.cs index 451e04bbddd6..dfea76dc58cb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadDeletionStatusObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The ThreadDeletionStatus_object. internal readonly partial struct ThreadDeletionStatusObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessage.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessage.Serialization.cs index 9dd2b99e3a9f..4ff991433c29 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessage.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ThreadMessage : IUtf8JsonSerializable, IJsonModel { @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); + writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("created_at"u8); writer.WriteNumberValue(CreatedAt, "U"); writer.WritePropertyName("thread_id"u8); @@ -80,10 +80,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (AssistantId != null) + if (AgentId != null) { writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WriteStringValue(AgentId); } else { @@ -165,7 +165,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode return null; } string id = default; - string @object = default; + ThreadMessageObject @object = default; DateTimeOffset createdAt = default; string threadId = default; MessageStatus status = default; @@ -189,7 +189,7 @@ internal static ThreadMessage DeserializeThreadMessage(JsonElement element, Mode } if (property.NameEquals("object"u8)) { - @object = property.Value.GetString(); + @object = new ThreadMessageObject(property.Value.GetString()); continue; } if (property.NameEquals("created_at"u8)) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessage.cs similarity index 89% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessage.cs index e5adfbbe605a..4962769b563b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessage.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A single, existing message within an agent thread. public partial class ThreadMessage @@ -60,12 +60,12 @@ public partial class ThreadMessage /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - /// If applicable, the ID of the agent that authored this message. + /// If applicable, the ID of the agent that authored this message. /// If applicable, the ID of the run associated with the authoring of this message. /// A list of files attached to the message, and the tools they were added to. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// , or is null. - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageIncompleteDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IEnumerable contentItems, string assistantId, string runId, IEnumerable attachments, IReadOnlyDictionary metadata) + internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageIncompleteDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IEnumerable contentItems, string agentId, string runId, IEnumerable attachments, IReadOnlyDictionary metadata) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(threadId, nameof(threadId)); @@ -80,7 +80,7 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes IncompleteAt = incompleteAt; Role = role; ContentItems = contentItems.ToList(); - AssistantId = assistantId; + AgentId = agentId; RunId = runId; Attachments = attachments?.ToList(); Metadata = metadata; @@ -101,12 +101,12 @@ internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, Mes /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - /// If applicable, the ID of the agent that authored this message. + /// If applicable, the ID of the agent that authored this message. /// If applicable, the ID of the run associated with the authoring of this message. /// A list of files attached to the message, and the tools they were added to. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Keeps track of any properties unknown to the library. - internal ThreadMessage(string id, string @object, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageIncompleteDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IReadOnlyList contentItems, string assistantId, string runId, IReadOnlyList attachments, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal ThreadMessage(string id, ThreadMessageObject @object, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageIncompleteDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IReadOnlyList contentItems, string agentId, string runId, IReadOnlyList attachments, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) { Id = id; Object = @object; @@ -118,7 +118,7 @@ internal ThreadMessage(string id, string @object, DateTimeOffset createdAt, stri IncompleteAt = incompleteAt; Role = role; ContentItems = contentItems; - AssistantId = assistantId; + AgentId = agentId; RunId = runId; Attachments = attachments; Metadata = metadata; @@ -132,6 +132,8 @@ internal ThreadMessage() /// The identifier, which can be referenced in API endpoints. public string Id { get; } + /// The object type, which is always 'thread.message'. + public ThreadMessageObject Object { get; } = ThreadMessageObject.ThreadMessage; /// The Unix timestamp, in seconds, representing when this object was created. public DateTimeOffset CreatedAt { get; } @@ -154,7 +156,7 @@ internal ThreadMessage() /// public IReadOnlyList ContentItems { get; } /// If applicable, the ID of the agent that authored this message. - public string AssistantId { get; } + public string AgentId { get; } /// If applicable, the ID of the run associated with the authoring of this message. public string RunId { get; } /// A list of files attached to the message, and the tools they were added to. diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageObject.cs new file mode 100644 index 000000000000..a2a9db9f85d8 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The ThreadMessage_object. + public readonly partial struct ThreadMessageObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ThreadMessageObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ThreadMessageValue = "thread.message"; + + /// thread.message. + public static ThreadMessageObject ThreadMessage { get; } = new ThreadMessageObject(ThreadMessageValue); + /// Determines if two values are the same. + public static bool operator ==(ThreadMessageObject left, ThreadMessageObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ThreadMessageObject left, ThreadMessageObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ThreadMessageObject(string value) => new ThreadMessageObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ThreadMessageObject other && Equals(other); + /// + public bool Equals(ThreadMessageObject 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/ThreadMessageOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageOptions.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageOptions.Serialization.cs index c9273090fd3f..8875b98c4777 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageOptions.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ThreadMessageOptions : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageOptions.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageOptions.cs index dbff5c77a2dc..626567258e06 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadMessageOptions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A single message within an agent thread, as provided during that thread's creation for its initial state. public partial class ThreadMessageOptions diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadRun.Serialization.cs similarity index 93% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadRun.Serialization.cs index 46c6f4a2e3f7..9485744fcd98 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadRun.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ThreadRun : IUtf8JsonSerializable, IJsonModel { @@ -37,11 +37,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); + writer.WriteStringValue(Object.ToString()); writer.WritePropertyName("thread_id"u8); writer.WriteStringValue(ThreadId); writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); + writer.WriteStringValue(AgentId); writer.WritePropertyName("status"u8); writer.WriteStringValue(Status.ToString()); if (Optional.IsDefined(RequiredAction)) @@ -291,7 +291,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW return null; } string id = default; - string @object = default; + ThreadRunObject @object = default; string threadId = default; string assistantId = default; RunStatus status = default; @@ -329,7 +329,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW } if (property.NameEquals("object"u8)) { - @object = property.Value.GetString(); + @object = new ThreadRunObject(property.Value.GetString()); continue; } if (property.NameEquals("thread_id"u8)) @@ -394,27 +394,52 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW } if (property.NameEquals("expires_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref expiresAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + expiresAt = null; + continue; + } + expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("started_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref startedAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + startedAt = null; + continue; + } + startedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("completed_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref completedAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + completedAt = null; + continue; + } + completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("cancelled_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref cancelledAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + cancelledAt = null; + continue; + } + cancelledAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("failed_at"u8)) { - DeserializeNullableDateTimeOffset(property, ref failedAt); + if (property.Value.ValueKind == JsonValueKind.Null) + { + failedAt = null; + continue; + } + failedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (property.NameEquals("incomplete_details"u8)) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadRun.cs similarity index 88% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadRun.cs index e26dcc9823d4..149c2a0282e7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadRun.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Data representing a single evaluation run of an agent thread. public partial class ThreadRun @@ -49,7 +49,7 @@ public partial class ThreadRun /// Initializes a new instance of . /// The identifier, which can be referenced in API endpoints. /// The ID of the thread associated with this run. - /// The ID of the agent associated with the thread this run was performed against. + /// The ID of the agent associated with the thread this run was performed against. /// The status of the agent thread run. /// The last error, if any, encountered by this agent thread run. /// The ID of the model to use. @@ -74,19 +74,19 @@ public partial class ThreadRun /// The response format of the tool calls used in this run. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Determines if tools can be executed in parallel within the run. - /// , , , , or is null. - internal ThreadRun(string id, string threadId, string assistantId, RunStatus status, RunError lastError, string model, string instructions, IEnumerable tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, bool parallelToolCalls) + /// , , , , or is null. + internal ThreadRun(string id, string threadId, string agentId, RunStatus status, RunError lastError, string model, string instructions, IEnumerable tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, bool parallelToolCalls) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); + Argument.AssertNotNull(agentId, nameof(agentId)); Argument.AssertNotNull(model, nameof(model)); Argument.AssertNotNull(instructions, nameof(instructions)); Argument.AssertNotNull(tools, nameof(tools)); Id = id; ThreadId = threadId; - AssistantId = assistantId; + AgentId = agentId; Status = status; LastError = lastError; Model = model; @@ -113,11 +113,11 @@ internal ThreadRun(string id, string threadId, string assistantId, RunStatus sta /// The identifier, which can be referenced in API endpoints. /// The object type, which is always 'thread.run'. /// The ID of the thread associated with this run. - /// The ID of the agent associated with the thread this run was performed against. + /// The ID of the agent associated with the thread this run was performed against. /// The status of the agent thread run. /// /// The details of the action required for the agent thread run to continue. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// /// The last error, if any, encountered by this agent thread run. @@ -147,12 +147,12 @@ internal ThreadRun(string id, string threadId, string assistantId, RunStatus sta /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. /// Determines if tools can be executed in parallel within the run. /// Keeps track of any properties unknown to the library. - internal ThreadRun(string id, string @object, string threadId, string assistantId, RunStatus status, RequiredAction requiredAction, RunError lastError, string model, string instructions, IReadOnlyList tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, UpdateToolResourcesOptions toolResources, bool parallelToolCalls, IDictionary serializedAdditionalRawData) + internal ThreadRun(string id, ThreadRunObject @object, string threadId, string agentId, RunStatus status, RequiredAction requiredAction, RunError lastError, string model, string instructions, IReadOnlyList tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, UpdateToolResourcesOptions toolResources, bool parallelToolCalls, IDictionary serializedAdditionalRawData) { Id = id; Object = @object; ThreadId = threadId; - AssistantId = assistantId; + AgentId = agentId; Status = status; RequiredAction = requiredAction; LastError = lastError; @@ -187,16 +187,18 @@ internal ThreadRun() /// The identifier, which can be referenced in API endpoints. public string Id { get; } + /// The object type, which is always 'thread.run'. + public ThreadRunObject Object { get; } = ThreadRunObject.ThreadRun; /// The ID of the thread associated with this run. public string ThreadId { get; } /// The ID of the agent associated with the thread this run was performed against. - public string AssistantId { get; } + public string AgentId { get; } /// The status of the agent thread run. public RunStatus Status { get; } /// /// The details of the action required for the agent thread run to continue. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// public RequiredAction RequiredAction { get; } diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/ThreadRunObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadRunObject.cs new file mode 100644 index 000000000000..e9d1e4785929 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadRunObject.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Agents +{ + /// The ThreadRun_object. + public readonly partial struct ThreadRunObject : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ThreadRunObject(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ThreadRunValue = "thread.run"; + + /// thread.run. + public static ThreadRunObject ThreadRun { get; } = new ThreadRunObject(ThreadRunValue); + /// Determines if two values are the same. + public static bool operator ==(ThreadRunObject left, ThreadRunObject right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ThreadRunObject left, ThreadRunObject right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ThreadRunObject(string value) => new ThreadRunObject(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ThreadRunObject other && Equals(other); + /// + public bool Equals(ThreadRunObject 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/ThreadStreamEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadStreamEvent.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ThreadStreamEvent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ThreadStreamEvent.cs index 446ffec4a4b9..532c2dcbe1f0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ThreadStreamEvent.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Thread operation related streaming events. public readonly partial struct ThreadStreamEvent : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnection.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolConnection.Serialization.cs index ff6ee80fc00d..26ecd4570bce 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnection.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ToolConnection : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnection.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolConnection.cs index d60e6fe9ab5b..e0672d7404ab 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnection.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A connection resource. public partial class ToolConnection diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnectionList.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolConnectionList.Serialization.cs index 628b423c477b..769ba7995f60 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnectionList.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ToolConnectionList : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnectionList.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolConnectionList.cs index 9b4fec134cef..948fa7f2c975 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolConnectionList.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A set of connection resources currently used by either the `bing_grounding`, `fabric_aiskill`, or `sharepoint_grounding` tools. public partial class ToolConnectionList diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolDefinition.Serialization.cs index 24642ea0f9fc..07caecbf52e6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolDefinition.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownToolDefinition))] public partial class ToolDefinition : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolDefinition.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolDefinition.cs index 212407f403df..4e1baf46ee49 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of an input tool definition that an agent can use. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolOutput.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolOutput.Serialization.cs index 440c7f5531ae..3d6cb9817683 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolOutput.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ToolOutput : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolOutput.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolOutput.cs index 4be9c96993c8..4ad092f38a97 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolOutput.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue. public partial class ToolOutput diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolResources.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolResources.Serialization.cs index df266cabef82..aa62f9716dc5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolResources.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class ToolResources : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ToolResources.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/ToolResources.cs index f3bc125c78b5..7329d0d93396 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/ToolResources.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// A set of resources that are used by the agent's tools. The resources are specific to the type of diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/TruncationObject.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/TruncationObject.Serialization.cs index eba9dc9264be..2003807b2194 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/TruncationObject.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class TruncationObject : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/TruncationObject.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/TruncationObject.cs index 679d27cf6b22..8ebb235ca6dc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/TruncationObject.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// Controls for how a thread will be truncated prior to the run. Use this to control the initial diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationStrategy.cs b/sdk/ai/Azure.AI.Agents/src/Generated/TruncationStrategy.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/TruncationStrategy.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/TruncationStrategy.cs index cb56b0f81c9d..256d9fc7dafe 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationStrategy.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/TruncationStrategy.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Possible truncation strategies for the thread. public readonly partial struct TruncationStrategy : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageContent.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageContent.Serialization.cs index c0a5642ef1c3..aae77c5d5ea4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageContent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownMessageContent : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageContent.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageContent.cs index 030da863c61a..1a6801b5f36f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageContent.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of MessageContent. internal partial class UnknownMessageContent : MessageContent diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaContent.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaContent.Serialization.cs index 76352db2197e..371fc2abb4f9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaContent.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownMessageDeltaContent : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaContent.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaContent.cs index 9aa9dd56098f..e23552ab22f4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaContent.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of MessageDeltaContent. internal partial class UnknownMessageDeltaContent : MessageDeltaContent diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs index 3e73c295a5ab..593f0221522f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownMessageDeltaTextAnnotation : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaTextAnnotation.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaTextAnnotation.cs index c1a702e2bfb2..35b0018b91bf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageDeltaTextAnnotation.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of MessageDeltaTextAnnotation. internal partial class UnknownMessageDeltaTextAnnotation : MessageDeltaTextAnnotation diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageTextAnnotation.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageTextAnnotation.Serialization.cs index d8afb5256a98..b024352ba19d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageTextAnnotation.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownMessageTextAnnotation : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageTextAnnotation.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageTextAnnotation.cs index add6b94cd4cd..69dcf4d29728 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownMessageTextAnnotation.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of MessageTextAnnotation. internal partial class UnknownMessageTextAnnotation : MessageTextAnnotation diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs index 34ec6852a21e..81a83e3237bd 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownOpenApiAuthDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownOpenApiAuthDetails.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownOpenApiAuthDetails.cs index 4844d77a2185..1ea212534e9a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownOpenApiAuthDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of OpenApiAuthDetails. internal partial class UnknownOpenApiAuthDetails : OpenApiAuthDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredAction.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredAction.Serialization.cs index 5cf96ac767ac..bd74dba76f60 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredAction.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRequiredAction : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredAction.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredAction.cs index a9368a767de8..00c3e7c9ef2a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredAction.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RequiredAction. internal partial class UnknownRequiredAction : RequiredAction diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredToolCall.Serialization.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredToolCall.Serialization.cs index ffa78e0a6fea..71cd0752f5d6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRequiredToolCall : IUtf8JsonSerializable, IJsonModel { @@ -57,20 +57,20 @@ internal static UnknownRequiredToolCall DeserializeUnknownRequiredToolCall(JsonE { return null; } - string id = default; string type = "Unknown"; + string id = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (property.NameEquals("type"u8)) { - id = property.Value.GetString(); + type = property.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (property.NameEquals("id"u8)) { - type = property.Value.GetString(); + id = property.Value.GetString(); continue; } if (options.Format != "W") @@ -79,7 +79,7 @@ internal static UnknownRequiredToolCall DeserializeUnknownRequiredToolCall(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownRequiredToolCall(type, serializedAdditionalRawData, id); + return new UnknownRequiredToolCall(type, id, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredToolCall.cs similarity index 75% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredToolCall.cs index 9fa6789c3766..c358ed0ed993 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRequiredToolCall.cs @@ -8,16 +8,16 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RequiredToolCall. internal partial class UnknownRequiredToolCall : RequiredToolCall { /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. + /// The object type for the required tool call. /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - internal UnknownRequiredToolCall(string type, IDictionary serializedAdditionalRawData, string id) : base(type, serializedAdditionalRawData, id) + /// Keeps track of any properties unknown to the library. + internal UnknownRequiredToolCall(string type, string id, IDictionary serializedAdditionalRawData) : base(type, id, serializedAdditionalRawData) { } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs index 000ea6842207..c7d3c5b74cd2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRunStepCodeInterpreterToolCallOutput : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs index 2fd983536cab..9da9e58ff2d6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RunStepCodeInterpreterToolCallOutput. internal partial class UnknownRunStepCodeInterpreterToolCallOutput : RunStepCodeInterpreterToolCallOutput diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs index 8df010fe02d9..57e5b19366de 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRunStepDeltaCodeInterpreterOutput : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs index 2aaf69a1c20b..8b788708a216 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RunStepDeltaCodeInterpreterOutput. internal partial class UnknownRunStepDeltaCodeInterpreterOutput : RunStepDeltaCodeInterpreterOutput diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs index ae6db6695c96..ab8a749688fa 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRunStepDeltaDetail : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaDetail.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaDetail.cs index a5ac9c43bae4..66a54e5ded4e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaDetail.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RunStepDeltaDetail. internal partial class UnknownRunStepDeltaDetail : RunStepDeltaDetail diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs index 8febd536f2b1..e4349a405cfe 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRunStepDeltaToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaToolCall.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaToolCall.cs index 2c31d5c2b174..9113eb381e0b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDeltaToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RunStepDeltaToolCall. internal partial class UnknownRunStepDeltaToolCall : RunStepDeltaToolCall diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDetails.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDetails.Serialization.cs index 01952cac0360..5860bda99a66 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDetails.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRunStepDetails : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDetails.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDetails.cs index a8b39aafcbf3..4bcf27a8a13a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepDetails.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RunStepDetails. internal partial class UnknownRunStepDetails : RunStepDetails diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepToolCall.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepToolCall.Serialization.cs index d16e4af2560c..1da0e334b45e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownRunStepToolCall : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepToolCall.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepToolCall.cs index 26e2ee7649c9..d2ca639c547c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownRunStepToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of RunStepToolCall. internal partial class UnknownRunStepToolCall : RunStepToolCall diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownToolDefinition.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownToolDefinition.Serialization.cs index 4269662c9a3f..0be1f0640a1f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownToolDefinition : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownToolDefinition.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownToolDefinition.cs index 99bbba5bf00a..719afa27debc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownToolDefinition.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of ToolDefinition. internal partial class UnknownToolDefinition : ToolDefinition diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs index ac13ccf96c5e..c43ff3c3ccb6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownVectorStoreChunkingStrategyRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs index 7ca4d51daf75..5fa9b61c7362 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of VectorStoreChunkingStrategyRequest. internal partial class UnknownVectorStoreChunkingStrategyRequest : VectorStoreChunkingStrategyRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs index 30219335a66c..ece2e990aed4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UnknownVectorStoreChunkingStrategyResponse : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs index d9896a124b6f..e990a0bddeb2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Unknown version of VectorStoreChunkingStrategyResponse. internal partial class UnknownVectorStoreChunkingStrategyResponse : VectorStoreChunkingStrategyResponse diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateAgentRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateAgentRequest.Serialization.cs index a7bd2bc6e9c2..a924a1dc743e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateAgentRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UpdateAgentRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateAgentRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateAgentRequest.cs index 6768e4d7de9e..30dd1e9315ef 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateAgentRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The UpdateAgentRequest. internal partial class UpdateAgentRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs index 36c2c8dc44ef..c6016de299a9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class UpdateCodeInterpreterToolResourceOptions : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs index 402e29bdc278..0589464e92b4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Request object to update `code_interpreted` tool resources. public partial class UpdateCodeInterpreterToolResourceOptions diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs index bbc6bb7e8384..7a6050b715e2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class UpdateFileSearchToolResourceOptions : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateFileSearchToolResourceOptions.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateFileSearchToolResourceOptions.cs index 892e93500be8..878aabbbb246 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateFileSearchToolResourceOptions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Request object to update `file_search` tool resources. public partial class UpdateFileSearchToolResourceOptions diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateMessageRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateMessageRequest.Serialization.cs index 82160ca08ef9..5331bbd61b77 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateMessageRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UpdateMessageRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateMessageRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateMessageRequest.cs index 45b3cf31de2b..95260c480d6e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateMessageRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The UpdateMessageRequest. internal partial class UpdateMessageRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateRunRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateRunRequest.Serialization.cs index 2c2820ad5274..0fb145d42e9b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateRunRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UpdateRunRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateRunRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateRunRequest.cs index 356bad9de457..a0a9d0c42f8a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateRunRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The UpdateRunRequest. internal partial class UpdateRunRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateThreadRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateThreadRequest.Serialization.cs index 7d662b1ab77c..297d1d50fa44 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateThreadRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UpdateThreadRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateThreadRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateThreadRequest.cs index 674b76d10fba..c538d1232c4a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateThreadRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The UpdateThreadRequest. internal partial class UpdateThreadRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateToolResourcesOptions.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateToolResourcesOptions.Serialization.cs index 4270b8d63f63..4d335705e35e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateToolResourcesOptions.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class UpdateToolResourcesOptions : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateToolResourcesOptions.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UpdateToolResourcesOptions.cs index 1ebcca9d85f1..07fa8dce856e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UpdateToolResourcesOptions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UploadFileRequest.Serialization.cs similarity index 92% rename from sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UploadFileRequest.Serialization.cs index 0d9c802a29aa..3d376eb5e454 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UploadFileRequest.Serialization.cs @@ -12,7 +12,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { internal partial class UploadFileRequest : IUtf8JsonSerializable, IJsonModel { @@ -89,7 +89,7 @@ internal static UploadFileRequest DeserializeUploadFileRequest(JsonElement eleme return null; } Stream file = default; - AgentFilePurpose purpose = default; + OpenAIFilePurpose purpose = default; string filename = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -102,7 +102,7 @@ internal static UploadFileRequest DeserializeUploadFileRequest(JsonElement eleme } if (property.NameEquals("purpose"u8)) { - purpose = new AgentFilePurpose(property.Value.GetString()); + purpose = new OpenAIFilePurpose(property.Value.GetString()); continue; } if (property.NameEquals("filename"u8)) @@ -134,6 +134,18 @@ private BinaryData SerializeMultipart(ModelReaderWriterOptions options) } } + internal virtual MultipartFormDataRequestContent ToMultipartRequestContent() + { + MultipartFormDataRequestContent content = new MultipartFormDataRequestContent(); + content.Add(Data, "file", "file", "application/octet-stream"); + content.Add(Purpose.ToString(), "purpose"); + if (Optional.IsDefined(Filename)) + { + content.Add(Filename, "filename"); + } + return content; + } + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/UploadFileRequest.cs similarity index 92% rename from sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/UploadFileRequest.cs index fc0b239d5c3c..133096617abb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/UploadFileRequest.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.IO; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The UploadFileRequest. internal partial class UploadFileRequest @@ -50,7 +50,7 @@ internal partial class UploadFileRequest /// The file data, in bytes. /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. /// is null. - internal UploadFileRequest(Stream data, AgentFilePurpose purpose) + internal UploadFileRequest(Stream data, OpenAIFilePurpose purpose) { Argument.AssertNotNull(data, nameof(data)); @@ -63,7 +63,7 @@ internal UploadFileRequest(Stream data, AgentFilePurpose purpose) /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. /// The name of the file. /// Keeps track of any properties unknown to the library. - internal UploadFileRequest(Stream data, AgentFilePurpose purpose, string filename, IDictionary serializedAdditionalRawData) + internal UploadFileRequest(Stream data, OpenAIFilePurpose purpose, string filename, IDictionary serializedAdditionalRawData) { Data = data; Purpose = purpose; @@ -79,7 +79,7 @@ internal UploadFileRequest() /// The file data, in bytes. public Stream Data { get; } /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. - public AgentFilePurpose Purpose { get; } + public OpenAIFilePurpose Purpose { get; } /// The name of the file. public string Filename { get; } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStore.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStore.Serialization.cs index 3e4d816c7363..38fbe27e9865 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStore.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStore : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStore.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStore.cs index c60dd6fffb48..589e7ab118ea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStore.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A vector store is a collection of processed files can be used by the `file_search` tool. public partial class VectorStore diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs index e79698bb0dcd..ea3824418ba4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreAutoChunkingStrategyRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs index eb0eaa3efb3c..ea6d7b6cae36 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400. public partial class VectorStoreAutoChunkingStrategyRequest : VectorStoreChunkingStrategyRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs index ffbabb3ff2df..41692837d5ef 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreAutoChunkingStrategyResponse : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs similarity index 97% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs index d4911fb0201f..08d4ae1cde6a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API. public partial class VectorStoreAutoChunkingStrategyResponse : VectorStoreChunkingStrategyResponse diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs index ff49c23cd828..23e5bf73a049 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownVectorStoreChunkingStrategyRequest))] public partial class VectorStoreChunkingStrategyRequest : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequest.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequest.cs index 3b63e8825cd6..9185b469f366 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of a vector store chunking strategy configuration. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequestType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequestType.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequestType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequestType.cs index 225312c10cf2..92966350dc8a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequestType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyRequestType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Type of chunking strategy. internal readonly partial struct VectorStoreChunkingStrategyRequestType : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs index 771b0c155a86..a9b176da7113 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs @@ -10,7 +10,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { [PersistableModelProxy(typeof(UnknownVectorStoreChunkingStrategyResponse))] public partial class VectorStoreChunkingStrategyResponse : IUtf8JsonSerializable, IJsonModel diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponse.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponse.cs index 66997d497a2b..a26b1e22620a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponse.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// An abstract representation of a vector store chunking strategy configuration. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponseType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponseType.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponseType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponseType.cs index af95ef419660..74f2236b0189 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponseType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreChunkingStrategyResponseType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Type of chunking strategy. internal readonly partial struct VectorStoreChunkingStrategyResponseType : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfiguration.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfiguration.Serialization.cs index de24c9213a43..1e7d4166ee30 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfiguration.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreConfiguration : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfiguration.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfiguration.cs index 21d41af59f98..e6c903d24d37 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfiguration.cs @@ -9,7 +9,7 @@ using System.Collections.Generic; using System.Linq; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// Vector storage configuration is the list of data sources, used when multiple diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfigurations.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfigurations.Serialization.cs index 3b1dfbac8f70..c8bfa2c6606e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfigurations.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreConfigurations : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfigurations.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfigurations.cs index f03ceff86442..d5fbae5e58e3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreConfigurations.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs. public partial class VectorStoreConfigurations diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSource.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSource.Serialization.cs index 817dc0f97056..b9386e8fc03b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSource.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreDataSource : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSource.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSource.cs index 5752d96eef2f..3d7a546ce6d1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSource.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// The structure, containing Azure asset URI path and the asset type of the file used as a data source diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSourceAssetType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSourceAssetType.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSourceAssetType.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSourceAssetType.cs index 8a121dac0aef..2a343e2d4785 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSourceAssetType.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDataSourceAssetType.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// /// Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatus.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatus.Serialization.cs index 3d133431643e..a50f7b9adbf9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatus.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreDeletionStatus : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatus.cs index 321e74552779..88603607fb86 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatus.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Response object for deleting a vector store. public partial class VectorStoreDeletionStatus diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatusObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatusObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatusObject.cs index 3390947ca448..7028e72f25c0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreDeletionStatusObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The VectorStoreDeletionStatus_object. public readonly partial struct VectorStoreDeletionStatusObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicy.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicy.Serialization.cs index f043e0ca0a65..4f1cb4791513 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicy.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreExpirationPolicy : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicy.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicy.cs index 3db18fe4a917..07ec639f87b8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicy.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The expiration policy for a vector store. public partial class VectorStoreExpirationPolicy diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicyAnchor.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicyAnchor.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicyAnchor.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicyAnchor.cs index 1bf85570a885..1ecbde732c17 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicyAnchor.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreExpirationPolicyAnchor.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Describes the relationship between the days and the expiration of this vector store. public readonly partial struct VectorStoreExpirationPolicyAnchor : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFile.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFile.Serialization.cs index 3e5e82f10cf7..8f163e528561 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFile.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreFile : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFile.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFile.cs index 951239eb4d06..11447940fbb0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFile.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Description of a file attached to a vector store. public partial class VectorStoreFile diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatch.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatch.Serialization.cs index ae8c1b1e774a..53069a591e3b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatch.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreFileBatch : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatch.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatch.cs index 88ff32d39ded..f7d306fd651a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatch.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A batch of files attached to a vector store. public partial class VectorStoreFileBatch diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatchObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatchObject.cs index 5e0f2c56022f..d9248f2fe22b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatchObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The VectorStoreFileBatch_object. public readonly partial struct VectorStoreFileBatchObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatchStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatchStatus.cs index fc774681056e..15ff8ed419b8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileBatchStatus.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The status of the vector store file batch. public readonly partial struct VectorStoreFileBatchStatus : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileCount.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileCount.Serialization.cs index 233f6af99086..a2e208901007 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileCount.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreFileCount : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileCount.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileCount.cs index c80206511a02..d2ed860e533f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileCount.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Counts of files processed or being processed by this vector store grouped by status. public partial class VectorStoreFileCount diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs index e96e8a8e25c4..cb675adc484b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreFileDeletionStatus : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatus.cs index 482e595895bd..cf35a515b1a6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatus.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Response object for deleting a vector store file relationship. public partial class VectorStoreFileDeletionStatus diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatusObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatusObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatusObject.cs index e504fb729bcc..08f68da4760f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileDeletionStatusObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The VectorStoreFileDeletionStatus_object. public readonly partial struct VectorStoreFileDeletionStatusObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileError.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileError.Serialization.cs index b37ebe047099..6acd77389f5b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileError.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreFileError : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileError.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileError.cs index 05eefeb61296..a09f53026b78 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileError.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Details on the error that may have occurred while processing a file for this vector store. public partial class VectorStoreFileError diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileErrorCode.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileErrorCode.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileErrorCode.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileErrorCode.cs index 1c57f06e4aa8..e37e98a751d5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileErrorCode.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileErrorCode.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Error code variants for vector store file processing. public readonly partial struct VectorStoreFileErrorCode : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileObject.cs index 193150fcabda..0af9487caccf 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The VectorStoreFile_object. public readonly partial struct VectorStoreFileObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileStatus.cs index e82d7daa48b4..349377696cbc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileStatus.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Vector store file status. public readonly partial struct VectorStoreFileStatus : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatusFilter.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileStatusFilter.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatusFilter.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileStatusFilter.cs index db1de56806d0..9c6f09055ccb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatusFilter.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreFileStatusFilter.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Query parameter filter for vector store file retrieval endpoint. public readonly partial struct VectorStoreFileStatusFilter : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreObject.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreObject.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreObject.cs index ca48dc13afdc..dd8ec10379e0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreObject.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreObject.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// The VectorStore_object. public readonly partial struct VectorStoreObject : IEquatable diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs index b9645c8b1edc..9816d963ce5e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreStaticChunkingStrategyOptions : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs index 422806be34d5..37acde99b1e7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Options to configure a vector store static chunking strategy. public partial class VectorStoreStaticChunkingStrategyOptions diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs index a3f8a7270e1a..9bb359133b41 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreStaticChunkingStrategyRequest : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs index f310b50f5a22..054c1da3d573 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A statically configured chunking strategy. public partial class VectorStoreStaticChunkingStrategyRequest : VectorStoreChunkingStrategyRequest diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs index 10b91017c3be..be192eaec02f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { public partial class VectorStoreStaticChunkingStrategyResponse : IUtf8JsonSerializable, IJsonModel { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs index fcbde230275c..ce990e596c11 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// A statically configured chunking strategy. public partial class VectorStoreStaticChunkingStrategyResponse : VectorStoreChunkingStrategyResponse diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStatus.cs b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStatus.cs similarity index 99% rename from sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStatus.cs rename to sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStatus.cs index 30cc174ef910..3572f5a8219a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStatus.cs +++ b/sdk/ai/Azure.AI.Agents/src/Generated/VectorStoreStatus.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.AI.Projects +namespace Azure.AI.Agents { /// Vector store possible status. public readonly partial struct VectorStoreStatus : IEquatable diff --git a/sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs b/sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..8d10aacbd48c --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.AI.Agents.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.Template")] diff --git a/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj b/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj new file mode 100644 index 000000000000..90c3ea8e0386 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/tests/Azure.AI.Agents.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/ai/Azure.AI.Agents/tsp-location.yaml b/sdk/ai/Azure.AI.Agents/tsp-location.yaml new file mode 100644 index 000000000000..f0a4ef6035c9 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/ai/Azure.AI.Agents +commit: f443736b9a9493d983e010fcf2b78dcc58ef5344 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs index 267dd3c78398..d1373ab712ff 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs @@ -73,16 +73,6 @@ public AIProjectClient(Uri endpoint, string subscriptionId, string resourceGroup _projectName = projectName; } - /// Initializes a new instance of AgentsClient. - /// The API version to use for this operation. - /// is null. - public virtual AgentsClient GetAgentsClient(string apiVersion = "2024-07-01-preview") - { - Argument.AssertNotNull(apiVersion, nameof(apiVersion)); - - return new AgentsClient(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, _subscriptionId, _resourceGroupName, _projectName, apiVersion); - } - /// Initializes a new instance of ConnectionsClient. /// The API version to use for this operation. /// is null. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs index 5e5c76b025ac..bf996ba43e6c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs @@ -172,747 +172,5 @@ public static InternalConnectionPropertiesNoAuth InternalConnectionPropertiesNoA { return new InternalConnectionPropertiesNoAuth(AuthenticationType.None, category, target, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// The type of binding, which is always 'storage_queue'. - /// Storage queue. - /// A new instance for mocking. - public static AzureFunctionBinding AzureFunctionBinding(AzureFunctionBindingType type = default, AzureFunctionStorageQueue storageQueue = null) - { - return new AzureFunctionBinding(type, storageQueue, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Type. - /// The JSON schema, describing response format. - /// A new instance for mocking. - public static ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(ResponseFormatJsonSchemaTypeType type = default, ResponseFormatJsonSchema jsonSchema = null) - { - return new ResponseFormatJsonSchemaType(type, jsonSchema, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The role of the entity that is creating the message. Allowed values include: - /// - `user`: Indicates the message is sent by an actual user and should be used in most - /// cases to represent user-generated messages. - /// - `assistant`: Indicates the message is generated by the agent. Use this value to insert - /// messages from the agent into the - /// conversation. - /// - /// - /// The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via - /// a separate call to the create message API. - /// - /// A list of files attached to the message, and the tools they should be added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// A new instance for mocking. - public static ThreadMessageOptions ThreadMessageOptions(MessageRole role = default, string content = null, IEnumerable attachments = null, IDictionary metadata = null) - { - attachments ??= new List(); - metadata ??= new Dictionary(); - - return new ThreadMessageOptions(role, content, attachments?.ToList(), metadata, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The provided reason describing why the message was marked as incomplete. - /// A new instance for mocking. - public static MessageIncompleteDetails MessageIncompleteDetails(MessageIncompleteDetailsReason reason = default) - { - return new MessageIncompleteDetails(reason, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type. - /// The textual content associated with this text annotation item. - /// A new instance for mocking. - public static MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null) - { - return new UnknownMessageTextAnnotation(type, text, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - /// A new instance for mocking. - public static RequiredToolCall RequiredToolCall(string type = null, string id = null) - { - return new UnknownRequiredToolCall(type, serializedAdditionalRawData: null, id); - } - - /// Initializes a new instance of . - /// The status for the error. - /// The human-readable text associated with the error. - /// A new instance for mocking. - public static RunError RunError(string code = null, string message = null) - { - return new RunError(code, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The reason why the run is incomplete. This indicates which specific token limit was reached during the run. - /// A new instance for mocking. - public static IncompleteRunDetails IncompleteRunDetails(IncompleteDetailsReason reason = default) - { - return new IncompleteRunDetails(reason, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Number of completion tokens used over the course of the run. - /// Number of prompt tokens used over the course of the run. - /// Total number of tokens used (prompt + completion). - /// A new instance for mocking. - public static RunCompletionUsage RunCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default) - { - return new RunCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Information about the message creation associated with this run step. - /// A new instance for mocking. - public static RunStepMessageCreationDetails RunStepMessageCreationDetails(RunStepMessageCreationReference messageCreation = null) - { - return new RunStepMessageCreationDetails(RunStepType.MessageCreation, serializedAdditionalRawData: null, messageCreation); - } - - /// Initializes a new instance of . - /// The ID of the message created by this run step. - /// A new instance for mocking. - public static RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null) - { - return new RunStepMessageCreationReference(messageId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// A list of tool call details for this run step. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// A new instance for mocking. - public static RunStepToolCallDetails RunStepToolCallDetails(IEnumerable toolCalls = null) - { - toolCalls ??= new List(); - - return new RunStepToolCallDetails(RunStepType.ToolCalls, serializedAdditionalRawData: null, toolCalls?.ToList()); - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// A new instance for mocking. - public static RunStepToolCall RunStepToolCall(string type = null, string id = null) - { - return new UnknownRunStepToolCall(type, id, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The serialized log output emitted by the code interpreter. - /// A new instance for mocking. - public static RunStepCodeInterpreterLogOutput RunStepCodeInterpreterLogOutput(string logs = null) - { - return new RunStepCodeInterpreterLogOutput("logs", serializedAdditionalRawData: null, logs); - } - - /// Initializes a new instance of . - /// Referential information for the image associated with this output. - /// A new instance for mocking. - public static RunStepCodeInterpreterImageOutput RunStepCodeInterpreterImageOutput(RunStepCodeInterpreterImageReference image = null) - { - return new RunStepCodeInterpreterImageOutput("image", serializedAdditionalRawData: null, image); - } - - /// Initializes a new instance of . - /// The ID of the file associated with this image. - /// A new instance for mocking. - public static RunStepCodeInterpreterImageReference RunStepCodeInterpreterImageReference(string fileId = null) - { - return new RunStepCodeInterpreterImageReference(fileId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// For now, this is always going to be an empty object. - /// A new instance for mocking. - public static RunStepFileSearchToolCall RunStepFileSearchToolCall(string id = null, RunStepFileSearchToolCallResults fileSearch = null) - { - return new RunStepFileSearchToolCall("file_search", id, serializedAdditionalRawData: null, fileSearch); - } - - /// Initializes a new instance of . - /// Ranking options for file search. - /// The array of a file search results. - /// A new instance for mocking. - public static RunStepFileSearchToolCallResults RunStepFileSearchToolCallResults(FileSearchRankingOptions rankingOptions = null, IEnumerable results = null) - { - results ??= new List(); - - return new RunStepFileSearchToolCallResults(rankingOptions, results?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The ID of the file that result was found in. - /// The name of the file that result was found in. - /// The score of the result. All values must be a floating point number between 0 and 1. - /// The content of the result that was found. The content is only included if requested via the include query parameter. - /// A new instance for mocking. - public static RunStepFileSearchToolCallResult RunStepFileSearchToolCallResult(string fileId = null, string fileName = null, float score = default, IEnumerable content = null) - { - content ??= new List(); - - return new RunStepFileSearchToolCallResult(fileId, fileName, score, content?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The type of the content. - /// The text content of the file. - /// A new instance for mocking. - public static FileSearchToolCallContent FileSearchToolCallContent(FileSearchToolCallContentType type = default, string text = null) - { - return new FileSearchToolCallContent(type, text, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, IReadOnlyDictionary bingGrounding = null) - { - bingGrounding ??= new Dictionary(); - - return new RunStepBingGroundingToolCall("bing_grounding", id, serializedAdditionalRawData: null, bingGrounding); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, IReadOnlyDictionary azureAISearch = null) - { - azureAISearch ??= new Dictionary(); - - return new RunStepAzureAISearchToolCall("azure_ai_search", id, serializedAdditionalRawData: null, azureAISearch); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, IReadOnlyDictionary sharePoint = null) - { - sharePoint ??= new Dictionary(); - - return new RunStepSharepointToolCall("sharepoint_grounding", id, serializedAdditionalRawData: null, sharePoint); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, IReadOnlyDictionary microsoftFabric = null) - { - microsoftFabric ??= new Dictionary(); - - return new RunStepMicrosoftFabricToolCall("fabric_aiskill", id, serializedAdditionalRawData: null, microsoftFabric); - } - - /// Initializes a new instance of . - /// The error code for this error. - /// The human-readable text associated with this error. - /// A new instance for mocking. - public static RunStepError RunStepError(RunStepErrorCode code = default, string message = null) - { - return new RunStepError(code, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Number of completion tokens used over the course of the run step. - /// Number of prompt tokens used over the course of the run step. - /// Total number of tokens used (prompt + completion). - /// A new instance for mocking. - public static RunStepCompletionUsage RunStepCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default) - { - return new RunStepCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// A new instance for mocking. - public static AgentPageableListOfVectorStore AgentPageableListOfVectorStore(AgentPageableListOfVectorStoreObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default) - { - data ??= new List(); - - return new AgentPageableListOfVectorStore( - @object, - data?.ToList(), - firstId, - lastId, - hasMore, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store`. - /// The Unix timestamp (in seconds) for when the vector store was created. - /// The name of the vector store. - /// The total number of bytes used by the files in the vector store. - /// Files count grouped by status processed or being processed by this vector store. - /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. - /// Details on when this vector store expires. - /// The Unix timestamp (in seconds) for when the vector store will expire. - /// The Unix timestamp (in seconds) for when the vector store was last active. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// A new instance for mocking. - public static VectorStore VectorStore(string id = null, VectorStoreObject @object = default, DateTimeOffset createdAt = default, string name = null, int usageBytes = default, VectorStoreFileCount fileCounts = null, VectorStoreStatus status = default, VectorStoreExpirationPolicy expiresAfter = null, DateTimeOffset? expiresAt = null, DateTimeOffset? lastActiveAt = null, IReadOnlyDictionary metadata = null) - { - metadata ??= new Dictionary(); - - return new VectorStore( - id, - @object, - createdAt, - name, - usageBytes, - fileCounts, - status, - expiresAfter, - expiresAt, - lastActiveAt, - metadata, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The number of files that are currently being processed. - /// The number of files that have been successfully processed. - /// The number of files that have failed to process. - /// The number of files that were cancelled. - /// The total number of files. - /// A new instance for mocking. - public static VectorStoreFileCount VectorStoreFileCount(int inProgress = default, int completed = default, int failed = default, int cancelled = default, int total = default) - { - return new VectorStoreFileCount( - inProgress, - completed, - failed, - cancelled, - total, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The options for the static chunking strategy. - /// A new instance for mocking. - public static VectorStoreStaticChunkingStrategyRequest VectorStoreStaticChunkingStrategyRequest(VectorStoreStaticChunkingStrategyOptions @static = null) - { - return new VectorStoreStaticChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType.Static, serializedAdditionalRawData: null, @static); - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'vector_store.deleted'. - /// A new instance for mocking. - public static VectorStoreDeletionStatus VectorStoreDeletionStatus(string id = null, bool deleted = default, VectorStoreDeletionStatusObject @object = default) - { - return new VectorStoreDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// A new instance for mocking. - public static AgentPageableListOfVectorStoreFile AgentPageableListOfVectorStoreFile(AgentPageableListOfVectorStoreFileObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default) - { - data ??= new List(); - - return new AgentPageableListOfVectorStoreFile( - @object, - data?.ToList(), - firstId, - lastId, - hasMore, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store.file`. - /// - /// The total vector store usage in bytes. Note that this may be different from the original file - /// size. - /// - /// The Unix timestamp (in seconds) for when the vector store file was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. - /// The last error associated with this vector store file. Will be `null` if there are no errors. - /// - /// The strategy used to chunk the file. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static VectorStoreFile VectorStoreFile(string id = null, VectorStoreFileObject @object = default, int usageBytes = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileStatus status = default, VectorStoreFileError lastError = null, VectorStoreChunkingStrategyResponse chunkingStrategy = null) - { - return new VectorStoreFile( - id, - @object, - usageBytes, - createdAt, - vectorStoreId, - status, - lastError, - chunkingStrategy, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// One of `server_error` or `rate_limit_exceeded`. - /// A human-readable description of the error. - /// A new instance for mocking. - public static VectorStoreFileError VectorStoreFileError(VectorStoreFileErrorCode code = default, string message = null) - { - return new VectorStoreFileError(code, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The options for the static chunking strategy. - /// A new instance for mocking. - public static VectorStoreStaticChunkingStrategyResponse VectorStoreStaticChunkingStrategyResponse(VectorStoreStaticChunkingStrategyOptions @static = null) - { - return new VectorStoreStaticChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType.Static, serializedAdditionalRawData: null, @static); - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'vector_store.deleted'. - /// A new instance for mocking. - public static VectorStoreFileDeletionStatus VectorStoreFileDeletionStatus(string id = null, bool deleted = default, VectorStoreFileDeletionStatusObject @object = default) - { - return new VectorStoreFileDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store.file_batch`. - /// The Unix timestamp (in seconds) for when the vector store files batch was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. - /// Files count grouped by status processed or being processed by this vector store. - /// A new instance for mocking. - public static VectorStoreFileBatch VectorStoreFileBatch(string id = null, VectorStoreFileBatchObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileBatchStatus status = default, VectorStoreFileCount fileCounts = null) - { - return new VectorStoreFileBatch( - id, - @object, - createdAt, - vectorStoreId, - status, - fileCounts, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier of the message, which can be referenced in API endpoints. - /// The object type, which is always `thread.message.delta`. - /// The delta containing the fields that have changed on the Message. - /// A new instance for mocking. - public static MessageDeltaChunk MessageDeltaChunk(string id = null, MessageDeltaChunkObject @object = default, MessageDelta delta = null) - { - return new MessageDeltaChunk(id, @object, delta, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The entity that produced the message. - /// - /// The content of the message as an array of text and/or images. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static MessageDelta MessageDelta(MessageRole role = default, IEnumerable content = null) - { - content ??= new List(); - - return new MessageDelta(role, content?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The type of content for this content part. - /// A new instance for mocking. - public static MessageDeltaContent MessageDeltaContent(int index = default, string type = null) - { - return new UnknownMessageDeltaContent(index, type, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The image_file data. - /// A new instance for mocking. - public static MessageDeltaImageFileContent MessageDeltaImageFileContent(int index = default, MessageDeltaImageFileContentObject imageFile = null) - { - return new MessageDeltaImageFileContent(index, "image_file", serializedAdditionalRawData: null, imageFile); - } - - /// Initializes a new instance of . - /// The file ID of the image in the message content. - /// A new instance for mocking. - public static MessageDeltaImageFileContentObject MessageDeltaImageFileContentObject(string fileId = null) - { - return new MessageDeltaImageFileContentObject(fileId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The text content details. - /// A new instance for mocking. - public static MessageDeltaTextContent MessageDeltaTextContent(int index = default, MessageDeltaTextContentObject text = null) - { - return new MessageDeltaTextContent(index, "text", serializedAdditionalRawData: null, text); - } - - /// Initializes a new instance of . - /// The data that makes up the text. - /// - /// Annotations for the text. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static MessageDeltaTextContentObject MessageDeltaTextContentObject(string value = null, IEnumerable annotations = null) - { - annotations ??= new List(); - - return new MessageDeltaTextContentObject(value, annotations?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The type of the text content annotation. - /// A new instance for mocking. - public static MessageDeltaTextAnnotation MessageDeltaTextAnnotation(int index = default, string type = null) - { - return new UnknownMessageDeltaTextAnnotation(index, type, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The file citation information. - /// The text in the message content that needs to be replaced. - /// The start index of this annotation in the content text. - /// The end index of this annotation in the content text. - /// A new instance for mocking. - public static MessageDeltaTextFileCitationAnnotation MessageDeltaTextFileCitationAnnotation(int index = default, MessageDeltaTextFileCitationAnnotationObject fileCitation = null, string text = null, int? startIndex = null, int? endIndex = null) - { - return new MessageDeltaTextFileCitationAnnotation( - index, - "file_citation", - serializedAdditionalRawData: null, - fileCitation, - text, - startIndex, - endIndex); - } - - /// Initializes a new instance of . - /// The ID of the specific file the citation is from. - /// The specific quote in the cited file. - /// A new instance for mocking. - public static MessageDeltaTextFileCitationAnnotationObject MessageDeltaTextFileCitationAnnotationObject(string fileId = null, string quote = null) - { - return new MessageDeltaTextFileCitationAnnotationObject(fileId, quote, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The file path information. - /// The start index of this annotation in the content text. - /// The end index of this annotation in the content text. - /// The text in the message content that needs to be replaced. - /// A new instance for mocking. - public static MessageDeltaTextFilePathAnnotation MessageDeltaTextFilePathAnnotation(int index = default, MessageDeltaTextFilePathAnnotationObject filePath = null, int? startIndex = null, int? endIndex = null, string text = null) - { - return new MessageDeltaTextFilePathAnnotation( - index, - "file_path", - serializedAdditionalRawData: null, - filePath, - startIndex, - endIndex, - text); - } - - /// Initializes a new instance of . - /// The file ID for the annotation. - /// A new instance for mocking. - public static MessageDeltaTextFilePathAnnotationObject MessageDeltaTextFilePathAnnotationObject(string fileId = null) - { - return new MessageDeltaTextFilePathAnnotationObject(fileId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier of the run step, which can be referenced in API endpoints. - /// The object type, which is always `thread.run.step.delta`. - /// The delta containing the fields that have changed on the run step. - /// A new instance for mocking. - public static RunStepDeltaChunk RunStepDeltaChunk(string id = null, RunStepDeltaChunkObject @object = default, RunStepDelta delta = null) - { - return new RunStepDeltaChunk(id, @object, delta, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The details of the run step. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static RunStepDelta RunStepDelta(RunStepDeltaDetail stepDetails = null) - { - return new RunStepDelta(stepDetails, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The message creation data. - /// A new instance for mocking. - public static RunStepDeltaMessageCreation RunStepDeltaMessageCreation(RunStepDeltaMessageCreationObject messageCreation = null) - { - return new RunStepDeltaMessageCreation("message_creation", serializedAdditionalRawData: null, messageCreation); - } - - /// Initializes a new instance of . - /// The ID of the newly-created message. - /// A new instance for mocking. - public static RunStepDeltaMessageCreationObject RunStepDeltaMessageCreationObject(string messageId = null) - { - return new RunStepDeltaMessageCreationObject(messageId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The collection of tool calls for the tool call detail item. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// A new instance for mocking. - public static RunStepDeltaToolCallObject RunStepDeltaToolCallObject(IEnumerable toolCalls = null) - { - toolCalls ??= new List(); - - return new RunStepDeltaToolCallObject("tool_calls", serializedAdditionalRawData: null, toolCalls?.ToList()); - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The type of the tool call detail item in a streaming run step's details. - /// A new instance for mocking. - public static RunStepDeltaToolCall RunStepDeltaToolCall(int index = default, string id = null, string type = null) - { - return new UnknownRunStepDeltaToolCall(index, id, type, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The function data for the tool call. - /// A new instance for mocking. - public static RunStepDeltaFunctionToolCall RunStepDeltaFunctionToolCall(int index = default, string id = null, RunStepDeltaFunction function = null) - { - return new RunStepDeltaFunctionToolCall(index, id, "function", serializedAdditionalRawData: null, function); - } - - /// Initializes a new instance of . - /// The name of the function. - /// The arguments passed to the function as input. - /// The output of the function, null if outputs have not yet been submitted. - /// A new instance for mocking. - public static RunStepDeltaFunction RunStepDeltaFunction(string name = null, string arguments = null, string output = null) - { - return new RunStepDeltaFunction(name, arguments, output, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepDeltaFileSearchToolCall RunStepDeltaFileSearchToolCall(int index = default, string id = null, RunStepFileSearchToolCallResults fileSearch = null) - { - return new RunStepDeltaFileSearchToolCall(index, id, "file_search", serializedAdditionalRawData: null, fileSearch); - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The Code Interpreter data for the tool call. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterToolCall RunStepDeltaCodeInterpreterToolCall(int index = default, string id = null, RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter = null) - { - return new RunStepDeltaCodeInterpreterToolCall(index, id, "code_interpreter", serializedAdditionalRawData: null, codeInterpreter); - } - - /// Initializes a new instance of . - /// The input into the Code Interpreter tool call. - /// - /// The outputs from the Code Interpreter tool call. Code Interpreter can output one or more - /// items, including text (`logs`) or images (`image`). Each of these are represented by a - /// different object type. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterDetailItemObject RunStepDeltaCodeInterpreterDetailItemObject(string input = null, IEnumerable outputs = null) - { - outputs ??= new List(); - - return new RunStepDeltaCodeInterpreterDetailItemObject(input, outputs?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The type of the streaming run step tool call's Code Interpreter output. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterOutput RunStepDeltaCodeInterpreterOutput(int index = default, string type = null) - { - return new UnknownRunStepDeltaCodeInterpreterOutput(index, type, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The text output from the Code Interpreter tool call. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterLogOutput RunStepDeltaCodeInterpreterLogOutput(int index = default, string logs = null) - { - return new RunStepDeltaCodeInterpreterLogOutput(index, "logs", serializedAdditionalRawData: null, logs); - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The image data for the Code Interpreter tool call output. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterImageOutput RunStepDeltaCodeInterpreterImageOutput(int index = default, RunStepDeltaCodeInterpreterImageOutputObject image = null) - { - return new RunStepDeltaCodeInterpreterImageOutput(index, "image", serializedAdditionalRawData: null, image); - } - - /// Initializes a new instance of . - /// The file ID for the image. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterImageOutputObject RunStepDeltaCodeInterpreterImageOutputObject(string fileId = null) - { - return new RunStepDeltaCodeInterpreterImageOutputObject(fileId, serializedAdditionalRawData: null); - } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFileObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFileObject.cs deleted file mode 100644 index 6adb77310e98..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFileObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfVectorStoreFile_object. - public readonly partial struct AgentPageableListOfVectorStoreFileObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentPageableListOfVectorStoreFileObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static AgentPageableListOfVectorStoreFileObject List { get; } = new AgentPageableListOfVectorStoreFileObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(AgentPageableListOfVectorStoreFileObject left, AgentPageableListOfVectorStoreFileObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentPageableListOfVectorStoreFileObject left, AgentPageableListOfVectorStoreFileObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentPageableListOfVectorStoreFileObject(string value) => new AgentPageableListOfVectorStoreFileObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentPageableListOfVectorStoreFileObject other && Equals(other); - /// - public bool Equals(AgentPageableListOfVectorStoreFileObject 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/AgentPageableListOfVectorStoreObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreObject.cs deleted file mode 100644 index 38c4b09c239a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfVectorStore_object. - public readonly partial struct AgentPageableListOfVectorStoreObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentPageableListOfVectorStoreObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static AgentPageableListOfVectorStoreObject List { get; } = new AgentPageableListOfVectorStoreObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(AgentPageableListOfVectorStoreObject left, AgentPageableListOfVectorStoreObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentPageableListOfVectorStoreObject left, AgentPageableListOfVectorStoreObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentPageableListOfVectorStoreObject(string value) => new AgentPageableListOfVectorStoreObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentPageableListOfVectorStoreObject other && Equals(other); - /// - public bool Equals(AgentPageableListOfVectorStoreObject 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/InternalOpenAIPageableListOfThreadMessage.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.Serialization.cs deleted file mode 100644 index c8ba5ca15bf4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.Serialization.cs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class InternalOpenAIPageableListOfThreadMessage : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadMessage)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - InternalOpenAIPageableListOfThreadMessage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadMessage)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfThreadMessage(document.RootElement, options); - } - - internal static InternalOpenAIPageableListOfThreadMessage DeserializeInternalOpenAIPageableListOfThreadMessage(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenAIPageableListOfThreadMessageObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new OpenAIPageableListOfThreadMessageObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ThreadMessage.DeserializeThreadMessage(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfThreadMessage( - @object, - data, - firstId, - lastId, - hasMore, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadMessage)} does not support writing '{options.Format}' format."); - } - } - - InternalOpenAIPageableListOfThreadMessage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeInternalOpenAIPageableListOfThreadMessage(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadMessage)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static InternalOpenAIPageableListOfThreadMessage FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeInternalOpenAIPageableListOfThreadMessage(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.cs deleted file mode 100644 index abeb4d7c18ec..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// An abstract representation of a tool invocation needed by the model to continue a run. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public abstract partial class RequiredToolCall : RequiredAction - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - /// is null. - protected RequiredToolCall(string id) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - internal RequiredToolCall(string type, IDictionary serializedAdditionalRawData, string id) : base(type, serializedAdditionalRawData) - { - Id = id; - } - - /// Initializes a new instance of for deserialization. - internal RequiredToolCall() - { - } - - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - public string Id { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/tsp-location.yaml b/sdk/ai/Azure.AI.Projects/tsp-location.yaml index 396a08a5fb0c..84c6c49918d6 100644 --- a/sdk/ai/Azure.AI.Projects/tsp-location.yaml +++ b/sdk/ai/Azure.AI.Projects/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Azure.AI.Projects -commit: 27e45fc03fd2698e3ad9b2799b313f289daeb142 +commit: f443736b9a9493d983e010fcf2b78dcc58ef5344 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/ai/ci.yml b/sdk/ai/ci.yml new file mode 100644 index 000000000000..2b5162fdbef2 --- /dev/null +++ b/sdk/ai/ci.yml @@ -0,0 +1,35 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/ai + - sdk/ai/ci.yml + - sdk/ai/Azure.AI.Agents + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/ai + - sdk/ai/ci.yml + - sdk/ai/Azure.AI.Agents + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: ai + ArtifactName: packages + Artifacts: + - name: Azure.AI.Agents + safeName: AzureAIAgents