From 558d3e3ff734cf4a25bc451d4f64b885584e6b41 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 29 Jan 2025 00:08:04 +0000 Subject: [PATCH] CodeGen from PR 32365 in Azure/azure-rest-api-specs Merge 06cb04e1b4f8a9e192b440a9283d5abff0c10576 into 9fc7db8ae667b80db8087aad00f88a866e778eba --- ...oft.Security.Copilot.SkillsetAuthoring.sln | 50 + .../Generated/Configuration.json | 10 + .../Generated/Docs/SkillContextClient.xml | 3185 +++++++ ...killsetAuthoringClientBuilderExtensions.cs | 38 + ...ityCopilotSkillsetAuthoringModelFactory.cs | 414 + .../Models/AccessToken.Serialization.cs | 49 + .../Generated/Models/AccessToken.cs | 33 + .../Models/AddSourceRequest.Serialization.cs | 31 + .../Generated/Models/AddSourceRequest.cs | 29 + .../Models/AddSourcesRequest.Serialization.cs | 36 + .../Generated/Models/AddSourcesRequest.cs | 38 + ...ddSuggestedPromptsRequest.Serialization.cs | 36 + .../Models/AddSuggestedPromptsRequest.cs | 38 + .../Models/AuthDetails.Serialization.cs | 54 + .../Generated/Models/AuthDetails.cs | 34 + .../Generated/Models/AuthLocationEnum.cs | 51 + ...ureOpenAIExecutionContext.Serialization.cs | 154 + .../Models/AzureOpenAIExecutionContext.cs | 76 + .../Generated/Models/BaseChoice.cs | 144 + .../Generated/Models/BaseCompletionRequest.cs | 121 + .../Models/BaseCompletionResponse.cs | 130 + .../Models/ChatChoice.Serialization.cs | 81 + .../Generated/Models/ChatChoice.cs | 46 + .../ChatCompletionRequest.Serialization.cs | 136 + .../Generated/Models/ChatCompletionRequest.cs | 84 + .../ChatCompletionResponse.Serialization.cs | 97 + .../Models/ChatCompletionResponse.cs | 55 + .../Generated/Models/Choice.Serialization.cs | 81 + .../Generated/Models/Choice.cs | 46 + .../Models/CompletionRequest.Serialization.cs | 102 + .../Generated/Models/CompletionRequest.cs | 56 + .../CompletionResponse.Serialization.cs | 97 + .../Generated/Models/CompletionResponse.cs | 55 + .../Models/ComplianceFlags.Serialization.cs | 54 + .../Generated/Models/ComplianceFlags.cs | 31 + ...eateChatCompletionRequest.Serialization.cs | 41 + .../Models/CreateChatCompletionRequest.cs | 44 + .../CreateCompletionRequest.Serialization.cs | 41 + .../Models/CreateCompletionRequest.cs | 44 + .../CreateEmbeddingRequest.Serialization.cs | 41 + .../Models/CreateEmbeddingRequest.cs | 44 + .../Models/EmbeddingData.Serialization.cs | 60 + .../Generated/Models/EmbeddingData.cs | 51 + .../Models/EmbeddingRequest.Serialization.cs | 35 + .../Generated/Models/EmbeddingRequest.cs | 58 + .../Models/EmbeddingResponse.Serialization.cs | 67 + .../Generated/Models/EmbeddingResponse.cs | 88 + .../Models/EvaluationInvocationCategory.cs | 51 + .../Models/EvaluationInvocationType.cs | 51 + .../EvaluationResultOutput.Serialization.cs | 46 + .../Models/EvaluationResultOutput.cs | 42 + .../Models/FunctionCall.Serialization.cs | 85 + .../Generated/Models/FunctionCall.cs | 42 + .../FunctionDefinition.Serialization.cs | 39 + .../Generated/Models/FunctionDefinition.cs | 68 + .../Models/FunctionParameter.Serialization.cs | 46 + .../Generated/Models/FunctionParameter.cs | 52 + ...FunctionParameterProperty.Serialization.cs | 40 + .../Models/FunctionParameterProperty.cs | 52 + .../Models/FunctionResult.Serialization.cs | 31 + .../Generated/Models/FunctionResult.cs | 29 + .../Models/GPTFunction.Serialization.cs | 37 + .../Generated/Models/GPTFunction.cs | 44 + .../Models/GetInputRequest.Serialization.cs | 43 + .../Generated/Models/GetInputRequest.cs | 40 + ...GetTokenCredentialRequest.Serialization.cs | 50 + .../Models/GetTokenCredentialRequest.cs | 48 + .../InvokeSkillRequest.Serialization.cs | 51 + .../Generated/Models/InvokeSkillRequest.cs | 47 + .../LogProgressRequest.Serialization.cs | 36 + .../Generated/Models/LogProgressRequest.cs | 40 + .../MedeinaExecutionContext.Serialization.cs | 156 + .../Models/MedeinaExecutionContext.cs | 157 + .../Generated/Models/Message.Serialization.cs | 132 + .../Generated/Models/Message.cs | 58 + .../Generated/Models/OutputComponent.cs | 54 + .../OutputSkillVariable.Serialization.cs | 220 + .../Generated/Models/OutputSkillVariable.cs | 67 + .../Generated/Models/ProgressLogLevel.cs | 57 + .../PromptHistoryResponse.Serialization.cs | 48 + .../Generated/Models/PromptHistoryResponse.cs | 38 + .../Models/SessionPrompt.Serialization.cs | 53 + .../Generated/Models/SessionPrompt.cs | 33 + ...alResponseSettingsRequest.Serialization.cs | 46 + .../Models/SetFinalResponseSettingsRequest.cs | 48 + .../Models/SetInputRequest.Serialization.cs | 43 + .../Generated/Models/SetInputRequest.cs | 40 + .../SkillContextResponse.Serialization.cs | 155 + .../Generated/Models/SkillContextResponse.cs | 147 + ...SkillDependencyDescriptor.Serialization.cs | 48 + .../Models/SkillDependencyDescriptor.cs | 34 + .../Models/SkillDescriptor.Serialization.cs | 186 + .../Generated/Models/SkillDescriptor.cs | 160 + .../SkillInputDescriptor.Serialization.cs | 89 + .../Generated/Models/SkillInputDescriptor.cs | 69 + .../SkillOutputComponent.Serialization.cs | 44 + .../Generated/Models/SkillOutputComponent.cs | 51 + .../Models/SkillOutputComponentAction.cs | 53 + .../SkillOutputDescriptor.Serialization.cs | 54 + .../Generated/Models/SkillOutputDescriptor.cs | 44 + .../Generated/Models/SkillOutputType.cs | 51 + .../Generated/Models/SkillPreviewState.cs | 54 + .../Models/SkillSource.Serialization.cs | 97 + .../Generated/Models/SkillSource.cs | 53 + .../Generated/Models/SkillSourceType.cs | 51 + .../SkillStructuredOutput.Serialization.cs | 36 + .../Generated/Models/SkillStructuredOutput.cs | 38 + .../SkillSummaryDescriptor.Serialization.cs | 48 + .../Models/SkillSummaryDescriptor.cs | 34 + .../SkillTypeDescriptor.Serialization.cs | 42 + .../Generated/Models/SkillTypeDescriptor.cs | 29 + .../Models/SkillVariable.Serialization.cs | 80 + .../Generated/Models/SkillVariable.cs | 38 + .../Generated/Models/SkillVisibility.cs | 54 + .../Models/SkillsetAuth.Serialization.cs | 42 + .../Generated/Models/SkillsetAuth.cs | 23 + .../Generated/Models/SkillsetAuthType.cs | 69 + .../Generated/Models/SkillsetCatalogScope.cs | 60 + .../Generated/Models/SkillsetCategory.cs | 63 + .../SkillsetDescriptor.Serialization.cs | 187 + .../Generated/Models/SkillsetDescriptor.cs | 164 + .../Models/SkillsetSetting.Serialization.cs | 84 + .../Generated/Models/SkillsetSetting.cs | 62 + .../Generated/Models/SkillsetSettingType.cs | 51 + .../Models/SuggestedPrompt.Serialization.cs | 58 + .../Generated/Models/SuggestedPrompt.cs | 29 + .../Generated/Models/TokenCredentialEnum.cs | 54 + .../Models/ToolCall.Serialization.cs | 74 + .../Generated/Models/ToolCall.cs | 39 + .../Models/ToolFunctionCall.Serialization.cs | 66 + .../Generated/Models/ToolFunctionCall.cs | 34 + .../Generated/Models/Tools.Serialization.cs | 33 + .../Generated/Models/Tools.cs | 34 + .../Generated/SkillContextClient.cs | 2990 +++++++ .../Generated/SkillContextClientOptions.cs | 37 + .../Generated/tspCodeModel.json | 7382 +++++++++++++++++ ....Security.Copilot.SkillsetAuthoring.csproj | 20 + .../tsp-location.yaml | 4 + .../Samples/Samples_SkillContextClient.cs | 3681 ++++++++ ...ity.Copilot.SkillsetAuthoring.Tests.csproj | 25 + 140 files changed, 25950 insertions(+) create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring.sln create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Configuration.json create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Docs/SkillContextClient.xml create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringClientBuilderExtensions.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringModelFactory.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthLocationEnum.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseChoice.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionResponse.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationCategory.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationType.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputComponent.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ProgressLogLevel.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponentAction.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputType.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillPreviewState.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSourceType.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVisibility.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuthType.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCatalogScope.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCategory.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSettingType.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/TokenCredentialEnum.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.Serialization.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClient.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClientOptions.cs create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/tspCodeModel.json create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Microsoft.Security.Copilot.SkillsetAuthoring.csproj create mode 100644 sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/tsp-location.yaml create mode 100644 sdk/securitycopilot/tests/Generated/Samples/Samples_SkillContextClient.cs create mode 100644 sdk/securitycopilot/tests/Microsoft.Security.Copilot.SkillsetAuthoring.Tests.csproj diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring.sln b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring.sln new file mode 100644 index 000000000000..9833cb99fc3c --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring.sln @@ -0,0 +1,50 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Security.Copilot.SkillsetAuthoring", "src\Microsoft.Security.Copilot.SkillsetAuthoring.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Security.Copilot.SkillsetAuthoring.Tests", "tests\Microsoft.Security.Copilot.SkillsetAuthoring.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 + {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/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Configuration.json b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Configuration.json new file mode 100644 index 000000000000..01f8d3761ea1 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Configuration.json @@ -0,0 +1,10 @@ +{ + "output-folder": ".", + "namespace": "Microsoft.Security.Copilot.SkillsetAuthoring", + "library-name": "Microsoft.Security.Copilot.SkillsetAuthoring", + "shared-source-folders": [ + "../TempTypeSpecFiles/TypeSpec/node_modules/@autorest/csharp/Generator.Shared", + "../TempTypeSpecFiles/TypeSpec/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "use-overloads-between-protocol-and-convenience": true +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Docs/SkillContextClient.xml b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Docs/SkillContextClient.xml new file mode 100644 index 000000000000..60d49c8be646 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Docs/SkillContextClient.xml @@ -0,0 +1,3185 @@ + + + + + +This sample shows how to call GetSkillContextAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = await client.GetSkillContextAsync(""); +]]> + + + + +This sample shows how to call GetSkillContext with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = client.GetSkillContext(""); +]]> + + + + +This sample shows how to call GetSkillContextAsync with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.GetSkillContextAsync("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("namespace").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("disaplyName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("icon").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("catalogScope").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("creatorUserId").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("ownersGroupId").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("format").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("altName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("examplePrompts")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("promptAlignedName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("enableVariableSubstitutionInCompose").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("featureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("valueStoredAsJson").ToString()); +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tenantId").ToString()); +Console.WriteLine(result.GetProperty("userId").ToString()); +Console.WriteLine(result.GetProperty("sessionId").ToString()); +Console.WriteLine(result.GetProperty("promptId").ToString()); +Console.WriteLine(result.GetProperty("evaluationId").ToString()); +Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("recordLog").ToString()); +Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); +Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); +Console.WriteLine(result.GetProperty("workspaceId").ToString()); +Console.WriteLine(result.GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("invocationType").ToString()); +Console.WriteLine(result.GetProperty("invocationCategory").ToString()); +Console.WriteLine(result.GetProperty("userName").ToString()); +]]> + + + + +This sample shows how to call GetSkillContext with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.GetSkillContext("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("namespace").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("disaplyName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("icon").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("catalogScope").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("creatorUserId").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("ownersGroupId").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("format").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("altName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("examplePrompts")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("promptAlignedName").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); +Console.WriteLine(result.GetProperty("descriptor").GetProperty("enableVariableSubstitutionInCompose").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("featureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("valueStoredAsJson").ToString()); +Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("startTime").ToString()); +Console.WriteLine(result.GetProperty("tenantId").ToString()); +Console.WriteLine(result.GetProperty("userId").ToString()); +Console.WriteLine(result.GetProperty("sessionId").ToString()); +Console.WriteLine(result.GetProperty("promptId").ToString()); +Console.WriteLine(result.GetProperty("evaluationId").ToString()); +Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("recordLog").ToString()); +Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); +Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); +Console.WriteLine(result.GetProperty("workspaceId").ToString()); +Console.WriteLine(result.GetProperty("source").ToString()); +Console.WriteLine(result.GetProperty("invocationType").ToString()); +Console.WriteLine(result.GetProperty("invocationCategory").ToString()); +Console.WriteLine(result.GetProperty("userName").ToString()); +]]> + + + + +This sample shows how to call InvokeSkillAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var invokeSkill = new InvokeSkillRequest("", new Dictionary +{ + ["key"] = new SkillVariable(true) +{ + Type = "", + Value = "", + }, +}) +{ + SkillsetName = "", +}; +var result = await client.InvokeSkillAsync("", invokeSkill); +]]> + + + + +This sample shows how to call InvokeSkill with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var invokeSkill = new InvokeSkillRequest("", new Dictionary +{ + ["key"] = new SkillVariable(true) +{ + Type = "", + Value = "", + }, +}) +{ + SkillsetName = "", +}; +var result = client.InvokeSkill("", invokeSkill); +]]> + + + + +This sample shows how to call InvokeSkillAsync with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillName = "", + inputs = new { + key = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + valueStoredAsJson = true, + }, + }, +}; + +Response response = await client.InvokeSkillAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); +Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); +Console.WriteLine(result.GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("outputLanguage").ToString()); +Console.WriteLine(result.GetProperty("outputType").ToString()); +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> +This sample shows how to call InvokeSkillAsync with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillsetName = "", + skillName = "", + inputs = new { + key = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }, +}; + +Response response = await client.InvokeSkillAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceSerializedData").ToString()); +Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); +Console.WriteLine(result.GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("outputLanguage").ToString()); +Console.WriteLine(result.GetProperty("outputType").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> + + + + +This sample shows how to call InvokeSkill with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillName = "", + inputs = new { + key = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + valueStoredAsJson = true, + }, + }, +}; + +Response response = client.InvokeSkill("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); +Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); +Console.WriteLine(result.GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("outputLanguage").ToString()); +Console.WriteLine(result.GetProperty("outputType").ToString()); +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> +This sample shows how to call InvokeSkill with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillsetName = "", + skillName = "", + inputs = new { + key = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }, +}; + +Response response = client.InvokeSkill("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); +Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceSerializedData").ToString()); +Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); +Console.WriteLine(result.GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("outputLanguage").ToString()); +Console.WriteLine(result.GetProperty("outputType").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> + + + + +This sample shows how to call GetSkillDescriptorAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var skillName = ""; +var result = await client.GetSkillDescriptorAsync("", skillName); +]]> + + + + +This sample shows how to call GetSkillDescriptor with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var skillName = ""; +var result = client.GetSkillDescriptor("", skillName); +]]> + + + + +This sample shows how to call GetSkillDescriptorAsync with required parameters and request content and parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = ""; + +Response response = await client.GetSkillDescriptorAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("skillset").GetProperty("namespace").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("disaplyName").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("icon").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("catalogScope").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("creatorUserId").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("ownersGroupId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("format").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("altName").ToString()); +Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); +Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("examplePrompts")[0].ToString()); +Console.WriteLine(result.GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); +Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("promptAlignedName").ToString()); +Console.WriteLine(result.GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); +Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); +Console.WriteLine(result.GetProperty("enableVariableSubstitutionInCompose").ToString()); +]]> + + + + +This sample shows how to call GetSkillDescriptor with required parameters and request content and parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = ""; + +Response response = client.GetSkillDescriptor("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("skillset").GetProperty("namespace").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("disaplyName").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("icon").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("category").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("catalogScope").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("enabled").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("creatorUserId").ToString()); +Console.WriteLine(result.GetProperty("skillset").GetProperty("ownersGroupId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("format").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("altName").ToString()); +Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); +Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("examplePrompts")[0].ToString()); +Console.WriteLine(result.GetProperty("hidden").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("required").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); +Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); +Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("promptAlignedName").ToString()); +Console.WriteLine(result.GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("userVisibility").ToString()); +Console.WriteLine(result.GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result.GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result.GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); +Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); +Console.WriteLine(result.GetProperty("enableVariableSubstitutionInCompose").ToString()); +]]> + + + + +This sample shows how to call GetSkillDescriptorsAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = await client.GetSkillDescriptorsAsync(""); +]]> + + + + +This sample shows how to call GetSkillDescriptors with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = client.GetSkillDescriptors(""); +]]> + + + + +This sample shows how to call GetSkillDescriptorsAsync with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.GetSkillDescriptorsAsync("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("namespace").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("disaplyName").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("icon").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("category").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("catalogScope").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("enabled").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("hidden").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("creatorUserId").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("ownersGroupId").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("format").ToString()); +Console.WriteLine(result[0].GetProperty("displayName").ToString()); +Console.WriteLine(result[0].GetProperty("altName").ToString()); +Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); +Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillName").ToString()); +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("examplePrompts")[0].ToString()); +Console.WriteLine(result[0].GetProperty("hidden").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("required").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); +Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("promptAlignedName").ToString()); +Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); +Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); +Console.WriteLine(result[0].GetProperty("enableVariableSubstitutionInCompose").ToString()); +]]> + + + + +This sample shows how to call GetSkillDescriptors with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.GetSkillDescriptors("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("namespace").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("disaplyName").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("icon").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("category").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("catalogScope").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("enabled").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("hidden").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("creatorUserId").ToString()); +Console.WriteLine(result[0].GetProperty("skillset").GetProperty("ownersGroupId").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("format").ToString()); +Console.WriteLine(result[0].GetProperty("displayName").ToString()); +Console.WriteLine(result[0].GetProperty("altName").ToString()); +Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); +Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillName").ToString()); +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("examplePrompts")[0].ToString()); +Console.WriteLine(result[0].GetProperty("hidden").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("required").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); +Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); +Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("promptAlignedName").ToString()); +Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("settings").GetProperty("").ToString()); +Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); +Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); +Console.WriteLine(result[0].GetProperty("enableVariableSubstitutionInCompose").ToString()); +]]> + + + + +This sample shows how to call GetSkillsetDescriptorsAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = await client.GetSkillsetDescriptorsAsync(""); +]]> + + + + +This sample shows how to call GetSkillsetDescriptors with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = client.GetSkillsetDescriptors(""); +]]> + + + + +This sample shows how to call GetSkillsetDescriptorsAsync with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.GetSkillsetDescriptorsAsync("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("namespace").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result[0].GetProperty("disaplyName").ToString()); +Console.WriteLine(result[0].GetProperty("icon").ToString()); +Console.WriteLine(result[0].GetProperty("category").ToString()); +Console.WriteLine(result[0].GetProperty("catalogScope").ToString()); +Console.WriteLine(result[0].GetProperty("enabled").ToString()); +Console.WriteLine(result[0].GetProperty("hidden").ToString()); +Console.WriteLine(result[0].GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result[0].GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result[0].GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("creatorUserId").ToString()); +Console.WriteLine(result[0].GetProperty("ownersGroupId").ToString()); +]]> + + + + +This sample shows how to call GetSkillsetDescriptors with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.GetSkillsetDescriptors("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result[0].GetProperty("namespace").ToString()); +Console.WriteLine(result[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("descriptionDisplay").ToString()); +Console.WriteLine(result[0].GetProperty("disaplyName").ToString()); +Console.WriteLine(result[0].GetProperty("icon").ToString()); +Console.WriteLine(result[0].GetProperty("category").ToString()); +Console.WriteLine(result[0].GetProperty("catalogScope").ToString()); +Console.WriteLine(result[0].GetProperty("enabled").ToString()); +Console.WriteLine(result[0].GetProperty("hidden").ToString()); +Console.WriteLine(result[0].GetProperty("prerequisites")[0].ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("name").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("label").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("description").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("hintText").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("settingType").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("required").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("defaultValue").ToString()); +Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("value").ToString()); +Console.WriteLine(result[0].GetProperty("authorization").GetProperty("type").ToString()); +Console.WriteLine(result[0].GetProperty("supportedAuthTypes")[0].ToString()); +Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); +Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); +Console.WriteLine(result[0].GetProperty("creatorUserId").ToString()); +Console.WriteLine(result[0].GetProperty("ownersGroupId").ToString()); +]]> + + + + +This sample shows how to call GetExecutionContextAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = await client.GetExecutionContextAsync(""); +]]> + + + + +This sample shows how to call GetExecutionContext with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = client.GetExecutionContext(""); +]]> + + + + +This sample shows how to call GetExecutionContextAsync with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.GetExecutionContextAsync("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("SessionId").ToString()); +Console.WriteLine(result.GetProperty("PromptId").ToString()); +Console.WriteLine(result.GetProperty("EvaluationId").ToString()); +Console.WriteLine(result.GetProperty("TenantId").ToString()); +Console.WriteLine(result.GetProperty("AccountId").ToString()); +Console.WriteLine(result.GetProperty("WorkspaceId").ToString()); +Console.WriteLine(result.GetProperty("UserName").ToString()); +Console.WriteLine(result.GetProperty("ApplicationId").ToString()); +Console.WriteLine(result.GetProperty("Source").ToString()); +Console.WriteLine(result.GetProperty("UnauthenticatedSourceApplicationId").ToString()); +Console.WriteLine(result.GetProperty("SelectedSkills").ToString()); +Console.WriteLine(result.GetProperty("SelectedSkillsets")[0].ToString()); +Console.WriteLine(result.GetProperty("IsFidelisUser").ToString()); +Console.WriteLine(result.GetProperty("InvocationType").ToString()); +Console.WriteLine(result.GetProperty("InvocationCategory").ToString()); +Console.WriteLine(result.GetProperty("EncryptedUserAccessToken").ToString()); +Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("recordLog").ToString()); +Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); +Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ApiVersion").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("Environment").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("IsGPUProxyEnabled").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("GpuProcessingGeo").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("CustomerAllowCrossGeoCompute").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("EcsAllowCrossGeoCompute").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ContentFilterProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ReportingProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("PreviewState").ToString()); +]]> + + + + +This sample shows how to call GetExecutionContext with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.GetExecutionContext("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("SessionId").ToString()); +Console.WriteLine(result.GetProperty("PromptId").ToString()); +Console.WriteLine(result.GetProperty("EvaluationId").ToString()); +Console.WriteLine(result.GetProperty("TenantId").ToString()); +Console.WriteLine(result.GetProperty("AccountId").ToString()); +Console.WriteLine(result.GetProperty("WorkspaceId").ToString()); +Console.WriteLine(result.GetProperty("UserName").ToString()); +Console.WriteLine(result.GetProperty("ApplicationId").ToString()); +Console.WriteLine(result.GetProperty("Source").ToString()); +Console.WriteLine(result.GetProperty("UnauthenticatedSourceApplicationId").ToString()); +Console.WriteLine(result.GetProperty("SelectedSkills").ToString()); +Console.WriteLine(result.GetProperty("SelectedSkillsets")[0].ToString()); +Console.WriteLine(result.GetProperty("IsFidelisUser").ToString()); +Console.WriteLine(result.GetProperty("InvocationType").ToString()); +Console.WriteLine(result.GetProperty("InvocationCategory").ToString()); +Console.WriteLine(result.GetProperty("EncryptedUserAccessToken").ToString()); +Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("recordLog").ToString()); +Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); +Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ApiVersion").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("Environment").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("IsGPUProxyEnabled").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("GpuProcessingGeo").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("CustomerAllowCrossGeoCompute").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("EcsAllowCrossGeoCompute").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ContentFilterProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ReportingProperties").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("PreviewState").ToString()); +]]> + + + + +This sample shows how to call GetPromptHistoryAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = await client.GetPromptHistoryAsync(""); +]]> + + + + +This sample shows how to call GetPromptHistory with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = client.GetPromptHistory(""); +]]> + + + + +This sample shows how to call GetPromptHistoryAsync with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.GetPromptHistoryAsync("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("prompt").ToString()); +Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("response").ToString()); +]]> + + + + +This sample shows how to call GetPromptHistory with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.GetPromptHistory("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("prompt").ToString()); +Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("response").ToString()); +]]> + + + + +This sample shows how to call LogProgressAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var logProgressRequest = new LogProgressRequest("") +{ + Level = ProgressLogLevel.Error, +}; +var result = await client.LogProgressAsync("", logProgressRequest); +]]> + + + + +This sample shows how to call LogProgress with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var logProgressRequest = new LogProgressRequest("") +{ + Level = ProgressLogLevel.Error, +}; +var result = client.LogProgress("", logProgressRequest); +]]> + + + + +This sample shows how to call LogProgressAsync with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + message = "", +}; + +Response response = await client.LogProgressAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call LogProgressAsync with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + level = "Error", + message = "", +}; + +Response response = await client.LogProgressAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call LogProgress with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + message = "", +}; + +Response response = client.LogProgress("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call LogProgress with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + level = "Error", + message = "", +}; + +Response response = client.LogProgress("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetSkillOutputAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var evaluationResultOutput = new EvaluationResultOutput(SkillOutputType.Primitive) +{ + PrimitiveOutput = new OutputSkillVariable(true, new SkillSource[] +{ + new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", + } + }, new SuggestedPrompt[] +{ + new SuggestedPrompt("") + }, "", new Dictionary +{ + ["key"] = "", + }, "", SkillOutputType.Primitive) +{ + Type = "", + Value = "", + }, + StructuredOutput = new SkillStructuredOutput(new SkillOutputComponent[] +{ + new SkillOutputComponent("", "", "", SkillOutputComponentAction.None, true) + }), + PrimitiveOutputValue = "", +}; +var result = await client.SetSkillOutputAsync("", evaluationResultOutput); +]]> + + + + +This sample shows how to call SetSkillOutput with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var evaluationResultOutput = new EvaluationResultOutput(SkillOutputType.Primitive) +{ + PrimitiveOutput = new OutputSkillVariable(true, new SkillSource[] +{ + new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", + } + }, new SuggestedPrompt[] +{ + new SuggestedPrompt("") + }, "", new Dictionary +{ + ["key"] = "", + }, "", SkillOutputType.Primitive) +{ + Type = "", + Value = "", + }, + StructuredOutput = new SkillStructuredOutput(new SkillOutputComponent[] +{ + new SkillOutputComponent("", "", "", SkillOutputComponentAction.None, true) + }), + PrimitiveOutputValue = "", +}; +var result = client.SetSkillOutput("", evaluationResultOutput); +]]> + + + + +This sample shows how to call SetSkillOutputAsync with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillOutputType = "Primitive", +}; + +Response response = await client.SetSkillOutputAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetSkillOutputAsync with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillOutputType = "Primitive", + primitiveOutput = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + structuredOutput = new { + components = new[] { + new { + action = "None", + includeInEvalResultAsRawComponent = true, + name = "", + content = "", + description = "", + type = "GptOutput", + } + }, + }, + primitiveOutputValue = "", +}; + +Response response = await client.SetSkillOutputAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetSkillOutput with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillOutputType = "Primitive", +}; + +Response response = client.SetSkillOutput("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetSkillOutput with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + skillOutputType = "Primitive", + primitiveOutput = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + structuredOutput = new { + components = new[] { + new { + action = "None", + includeInEvalResultAsRawComponent = true, + name = "", + content = "", + description = "", + type = "GptOutput", + } + }, + }, + primitiveOutputValue = "", +}; + +Response response = client.SetSkillOutput("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call GetSkillsetSettingsAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = await client.GetSkillsetSettingsAsync(""); +]]> + + + + +This sample shows how to call GetSkillsetSettings with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = client.GetSkillsetSettings(""); +]]> + + + + +This sample shows how to call GetSkillsetSettingsAsync with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.GetSkillsetSettingsAsync("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("").ToString()); +]]> + + + + +This sample shows how to call GetSkillsetSettings with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.GetSkillsetSettings("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("").ToString()); +]]> + + + + +This sample shows how to call SetSkillInvocationStartedAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.SetSkillInvocationStartedAsync(""); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetSkillInvocationStarted with required parameters. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.SetSkillInvocationStarted(""); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetSkillInvocationCompletedAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.SetSkillInvocationCompletedAsync(""); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetSkillInvocationCompleted with required parameters. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.SetSkillInvocationCompleted(""); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call GetSkillsetAuthInfoAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = await client.GetSkillsetAuthInfoAsync(""); +]]> + + + + +This sample shows how to call GetSkillsetAuthInfo with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var result = client.GetSkillsetAuthInfo(""); +]]> + + + + +This sample shows how to call GetSkillsetAuthInfoAsync with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = await client.GetSkillsetAuthInfoAsync("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("authLocation").ToString()); +Console.WriteLine(result.GetProperty("authInfo").GetProperty("").ToString()); +]]> + + + + +This sample shows how to call GetSkillsetAuthInfo with required parameters and parse the result. +"); +var client = new SkillContextClient(endpoint); + +Response response = client.GetSkillsetAuthInfo("", new RequestContext()); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("authLocation").ToString()); +Console.WriteLine(result.GetProperty("authInfo").GetProperty("").ToString()); +]]> + + + + +This sample shows how to call GetTokenCredentialAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var getTokenCredentialRequest = new GetTokenCredentialRequest(new string[] +{ + "" +}, TokenCredentialEnum.None) +{ + TenantId = "", +}; +var result = await client.GetTokenCredentialAsync("", getTokenCredentialRequest); +]]> + + + + +This sample shows how to call GetTokenCredential with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var getTokenCredentialRequest = new GetTokenCredentialRequest(new string[] +{ + "" +}, TokenCredentialEnum.None) +{ + TenantId = "", +}; +var result = client.GetTokenCredential("", getTokenCredentialRequest); +]]> + + + + +This sample shows how to call GetTokenCredentialAsync with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + scopes = new[] { + "" + }, + tokenCredentialType = "None", +}; + +Response response = await client.GetTokenCredentialAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("token").ToString()); +Console.WriteLine(result.GetProperty("expiresOn").ToString()); +]]> +This sample shows how to call GetTokenCredentialAsync with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + scopes = new[] { + "" + }, + tokenCredentialType = "None", + tenantId = "", +}; + +Response response = await client.GetTokenCredentialAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("token").ToString()); +Console.WriteLine(result.GetProperty("expiresOn").ToString()); +]]> + + + + +This sample shows how to call GetTokenCredential with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + scopes = new[] { + "" + }, + tokenCredentialType = "None", +}; + +Response response = client.GetTokenCredential("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("token").ToString()); +Console.WriteLine(result.GetProperty("expiresOn").ToString()); +]]> +This sample shows how to call GetTokenCredential with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + scopes = new[] { + "" + }, + tokenCredentialType = "None", + tenantId = "", +}; + +Response response = client.GetTokenCredential("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("token").ToString()); +Console.WriteLine(result.GetProperty("expiresOn").ToString()); +]]> + + + + +This sample shows how to call GetInputAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var getInputRequest = new GetInputRequest("") +{ + DefaultValue = new SkillVariable(true) +{ + Type = "", + Value = "", + }, +}; +var result = await client.GetInputAsync("", getInputRequest); +]]> + + + + +This sample shows how to call GetInput with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var getInputRequest = new GetInputRequest("") +{ + DefaultValue = new SkillVariable(true) +{ + Type = "", + Value = "", + }, +}; +var result = client.GetInput("", getInputRequest); +]]> + + + + +This sample shows how to call GetInputAsync with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", +}; + +Response response = await client.GetInputAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> +This sample shows how to call GetInputAsync with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", + defaultValue = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, +}; + +Response response = await client.GetInputAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> + + + + +This sample shows how to call GetInput with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", +}; + +Response response = client.GetInput("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> +This sample shows how to call GetInput with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", + defaultValue = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, +}; + +Response response = client.GetInput("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("value").ToString()); +Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); +]]> + + + + +This sample shows how to call SetInputAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var setInputRequest = new SetInputRequest("") +{ + DefaultValue = new SkillVariable(true) +{ + Type = "", + Value = "", + }, +}; +var result = await client.SetInputAsync("", setInputRequest); +]]> + + + + +This sample shows how to call SetInput with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var setInputRequest = new SetInputRequest("") +{ + DefaultValue = new SkillVariable(true) +{ + Type = "", + Value = "", + }, +}; +var result = client.SetInput("", setInputRequest); +]]> + + + + +This sample shows how to call SetInputAsync with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", +}; + +Response response = await client.SetInputAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetInputAsync with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", + defaultValue = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, +}; + +Response response = await client.SetInputAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetInput with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", +}; + +Response response = client.SetInput("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetInput with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + inputName = "", + defaultValue = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, +}; + +Response response = client.SetInput("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call AddSourcesAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var addSourcesRequest = new AddSourcesRequest(new SkillSource[] +{ + new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", + } +}); +var result = await client.AddSourcesAsync("", addSourcesRequest); +]]> + + + + +This sample shows how to call AddSources with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var addSourcesRequest = new AddSourcesRequest(new SkillSource[] +{ + new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", + } +}); +var result = client.AddSources("", addSourcesRequest); +]]> + + + + +This sample shows how to call AddSourcesAsync with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, +}; + +Response response = await client.AddSourcesAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call AddSources with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, +}; + +Response response = client.AddSources("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call AddSourceAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var addSourceRequest = new AddSourceRequest(new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", +}); +var result = await client.AddSourceAsync("", addSourceRequest); +]]> + + + + +This sample shows how to call AddSource with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var addSourceRequest = new AddSourceRequest(new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", +}); +var result = client.AddSource("", addSourceRequest); +]]> + + + + +This sample shows how to call AddSourceAsync with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + SkillSource = new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + }, +}; + +Response response = await client.AddSourceAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddSourceAsync with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + SkillSource = new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + }, +}; + +Response response = await client.AddSourceAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call AddSource with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + SkillSource = new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + }, +}; + +Response response = client.AddSource("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddSource with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + SkillSource = new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + }, +}; + +Response response = client.AddSource("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call AddSuggestedPromptsAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var addSuggestedPromptsRequest = new AddSuggestedPromptsRequest(new SuggestedPrompt[] +{ + new SuggestedPrompt("") +}); +var result = await client.AddSuggestedPromptsAsync("", addSuggestedPromptsRequest); +]]> + + + + +This sample shows how to call AddSuggestedPrompts with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var addSuggestedPromptsRequest = new AddSuggestedPromptsRequest(new SuggestedPrompt[] +{ + new SuggestedPrompt("") +}); +var result = client.AddSuggestedPrompts("", addSuggestedPromptsRequest); +]]> + + + + +This sample shows how to call AddSuggestedPromptsAsync with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + suggestedPrompts = new[] { + new { + prompt = "", + } + }, +}; + +Response response = await client.AddSuggestedPromptsAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call AddSuggestedPrompts with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + suggestedPrompts = new[] { + new { + prompt = "", + } + }, +}; + +Response response = client.AddSuggestedPrompts("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetFinalResponseSettingsAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var setFinalResponseSettingsRequest = new SetFinalResponseSettingsRequest("") +{ + FinalResponseFormat = "", + FinalResponsePersona = "", + FinalResponseFallback = "", +}; +var result = await client.SetFinalResponseSettingsAsync("", setFinalResponseSettingsRequest); +]]> + + + + +This sample shows how to call SetFinalResponseSettings with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var setFinalResponseSettingsRequest = new SetFinalResponseSettingsRequest("") +{ + FinalResponseFormat = "", + FinalResponsePersona = "", + FinalResponseFallback = "", +}; +var result = client.SetFinalResponseSettings("", setFinalResponseSettingsRequest); +]]> + + + + +This sample shows how to call SetFinalResponseSettingsAsync with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + finalResponseBehavior = "", +}; + +Response response = await client.SetFinalResponseSettingsAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetFinalResponseSettingsAsync with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + finalResponseBehavior = "", + finalResponseFormat = "", + finalResponsePersona = "", + finalResponseFallback = "", +}; + +Response response = await client.SetFinalResponseSettingsAsync("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call SetFinalResponseSettings with required parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + finalResponseBehavior = "", +}; + +Response response = client.SetFinalResponseSettings("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> +This sample shows how to call SetFinalResponseSettings with all parameters and request content. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + finalResponseBehavior = "", + finalResponseFormat = "", + finalResponsePersona = "", + finalResponseFallback = "", +}; + +Response response = client.SetFinalResponseSettings("", RequestContent.Create(data)); +Console.WriteLine(response.Status); +]]> + + + + +This sample shows how to call CreateChatCompletionAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var request = new CreateChatCompletionRequest(new ChatCompletionRequest(new string[] +{ + "" +}, null, BinaryData.FromString(""), new Message[] +{ + new Message("") +{ + Content = "", + Name = "", + FunctionCall = new FunctionCall("") +{ + Arguments = +{ + ["key"] = "", + }, + }, + ToolCalls = +{ + new ToolCall("", "", new ToolFunctionCall("", "")) + }, + ToolCallId = "", + } +}, new GPTFunction[] +{ + new GPTFunction("", "", new FunctionParameter("", new Dictionary +{ + ["key"] = new FunctionParameterProperty("", "", new string[] +{ + "" + }), + }, new string[] +{ + "" + }), new FunctionResult("")) +}, "") +{ + Tools = +{ + new Tools("", new FunctionDefinition("", "", BinaryData.FromString(""))) + }, + ToolChoice = "", + ParallelToolCalls = true, +}) +{ + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) +{ + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, +}; +var result = await client.CreateChatCompletionAsync("", request); +]]> + + + + +This sample shows how to call CreateChatCompletion with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var request = new CreateChatCompletionRequest(new ChatCompletionRequest(new string[] +{ + "" +}, null, BinaryData.FromString(""), new Message[] +{ + new Message("") +{ + Content = "", + Name = "", + FunctionCall = new FunctionCall("") +{ + Arguments = +{ + ["key"] = "", + }, + }, + ToolCalls = +{ + new ToolCall("", "", new ToolFunctionCall("", "")) + }, + ToolCallId = "", + } +}, new GPTFunction[] +{ + new GPTFunction("", "", new FunctionParameter("", new Dictionary +{ + ["key"] = new FunctionParameterProperty("", "", new string[] +{ + "" + }), + }, new string[] +{ + "" + }), new FunctionResult("")) +}, "") +{ + Tools = +{ + new Tools("", new FunctionDefinition("", "", BinaryData.FromString(""))) + }, + ToolChoice = "", + ParallelToolCalls = true, +}) +{ + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) +{ + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, +}; +var result = client.CreateChatCompletion("", request); +]]> + + + + +This sample shows how to call CreateChatCompletionAsync with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + chatCompletionRequest = new { + Messages = new[] { + new { + Role = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Stop = new[] { + "" + }, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, +}; + +Response response = await client.CreateChatCompletionAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> +This sample shows how to call CreateChatCompletionAsync with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + deploymentId = "", + chatCompletionRequest = new { + Messages = new[] { + new { + Content = "", + Role = "", + Name = "", + FunctionCall = new { + Name = "", + Arguments = new { + key = "", + }, + }, + ToolCalls = new[] { + new { + Id = "", + Type = "", + Function = new { + Name = "", + Arguments = "", + }, + } + }, + ToolCallId = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Tools = new[] { + new { + Type = "", + Function = new { + Description = "", + Name = "", + Parameters = new {}, + }, + } + }, + ToolChoice = "", + ParallelToolCalls = true, + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, + openAiExecutionContext = new { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new { + key = "", + }, + ReportingProperties = new { + key = "", + }, + }, +}; + +Response response = await client.CreateChatCompletionAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Content").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Name").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Name").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Arguments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Type").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Name").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Arguments").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCallId").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> + + + + +This sample shows how to call CreateChatCompletion with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + chatCompletionRequest = new { + Messages = new[] { + new { + Role = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Stop = new[] { + "" + }, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, +}; + +Response response = client.CreateChatCompletion("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> +This sample shows how to call CreateChatCompletion with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + deploymentId = "", + chatCompletionRequest = new { + Messages = new[] { + new { + Content = "", + Role = "", + Name = "", + FunctionCall = new { + Name = "", + Arguments = new { + key = "", + }, + }, + ToolCalls = new[] { + new { + Id = "", + Type = "", + Function = new { + Name = "", + Arguments = "", + }, + } + }, + ToolCallId = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Tools = new[] { + new { + Type = "", + Function = new { + Description = "", + Name = "", + Parameters = new {}, + }, + } + }, + ToolChoice = "", + ParallelToolCalls = true, + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, + openAiExecutionContext = new { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new { + key = "", + }, + ReportingProperties = new { + key = "", + }, + }, +}; + +Response response = client.CreateChatCompletion("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Content").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Name").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Name").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Arguments").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Type").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Name").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Arguments").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCallId").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> + + + + +This sample shows how to call CreateCompletionAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var request = new CreateCompletionRequest(new CompletionRequest(new string[] +{ + "" +}, null, BinaryData.FromString(""), "")) +{ + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) +{ + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, +}; +var result = await client.CreateCompletionAsync("", request); +]]> + + + + +This sample shows how to call CreateCompletion with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var request = new CreateCompletionRequest(new CompletionRequest(new string[] +{ + "" +}, null, BinaryData.FromString(""), "")) +{ + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) +{ + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, +}; +var result = client.CreateCompletion("", request); +]]> + + + + +This sample shows how to call CreateCompletionAsync with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + completionRequest = new { + Prompt = "", + Stop = new[] { + "" + }, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, +}; + +Response response = await client.CreateCompletionAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> +This sample shows how to call CreateCompletionAsync with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + deploymentId = "", + completionRequest = new { + Prompt = "", + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, + openAiExecutionContext = new { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new { + key = "", + }, + ReportingProperties = new { + key = "", + }, + }, +}; + +Response response = await client.CreateCompletionAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> + + + + +This sample shows how to call CreateCompletion with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + completionRequest = new { + Prompt = "", + Stop = new[] { + "" + }, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, +}; + +Response response = client.CreateCompletion("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> +This sample shows how to call CreateCompletion with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + deploymentId = "", + completionRequest = new { + Prompt = "", + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new { + key = 1234, + }, + ResponseFormat = new {}, + }, + openAiExecutionContext = new { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new { + key = "", + }, + ReportingProperties = new { + key = "", + }, + }, +}; + +Response response = client.CreateCompletion("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); +Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); +Console.WriteLine(result.GetProperty("Id").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Created").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); +]]> + + + + +This sample shows how to call CreateEmbeddingAsync with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var request = new CreateEmbeddingRequest(new EmbeddingRequest(BinaryData.FromString(""))) +{ + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) +{ + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, +}; +var result = await client.CreateEmbeddingAsync("", request); +]]> + + + + +This sample shows how to call CreateEmbedding with required parameters. +"); +var client = new SkillContextClient(endpoint); + +var request = new CreateEmbeddingRequest(new EmbeddingRequest(BinaryData.FromString(""))) +{ + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) +{ + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, +}; +var result = client.CreateEmbedding("", request); +]]> + + + + +This sample shows how to call CreateEmbeddingAsync with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + embeddingRequest = new { + Input = new {}, + }, +}; + +Response response = await client.CreateEmbeddingAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +]]> +This sample shows how to call CreateEmbeddingAsync with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + deploymentId = "", + embeddingRequest = new { + Input = new {}, + }, + openAiExecutionContext = new { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new { + key = "", + }, + ReportingProperties = new { + key = "", + }, + }, +}; + +Response response = await client.CreateEmbeddingAsync("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +]]> + + + + +This sample shows how to call CreateEmbedding with required parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + embeddingRequest = new { + Input = new {}, + }, +}; + +Response response = client.CreateEmbedding("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +]]> +This sample shows how to call CreateEmbedding with all parameters and request content, and how to parse the result. +"); +var client = new SkillContextClient(endpoint); + +var data = new { + deploymentId = "", + embeddingRequest = new { + Input = new {}, + }, + openAiExecutionContext = new { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new { + key = "", + }, + ReportingProperties = new { + key = "", + }, + }, +}; + +Response response = client.CreateEmbedding("", RequestContent.Create(data)); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); +Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Model").ToString()); +Console.WriteLine(result.GetProperty("Object").ToString()); +Console.WriteLine(result.GetProperty("Usage").ToString()); +]]> + + + + \ No newline at end of file diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringClientBuilderExtensions.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringClientBuilderExtensions.cs new file mode 100644 index 000000000000..2de6ca4d72a6 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringClientBuilderExtensions.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core.Extensions; +using Microsoft.Security.Copilot.SkillsetAuthoring; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class MicrosoftSecurityCopilotSkillsetAuthoringClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// + /// Supported Security Copilot API endpoints (protocol and host name, such as + /// https://api.medeina-dev.defender.microsoft.com). + /// + public static IAzureClientBuilder AddSkillContextClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilder + { + return builder.RegisterClientFactory((options) => new SkillContextClient(endpoint, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddSkillContextClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringModelFactory.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringModelFactory.cs new file mode 100644 index 000000000000..1d9fc6ed0259 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/MicrosoftSecurityCopilotSkillsetAuthoringModelFactory.cs @@ -0,0 +1,414 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Model factory for models. + public static partial class MicrosoftSecurityCopilotSkillsetAuthoringModelFactory + { + /// Initializes a new instance of SkillContextResponse. + /// Skill descriptor containing attributes that describe a skill (i.e. Inputs required to execute the skill). + /// SkillContext Id. + /// Array of feature flags. + /// Skill Variable Collection. + /// Additional skill specific settings. + /// TODO. + /// Tenant id of tenant in which skill invocation occured. + /// User id of user that invoked the skill. + /// Current session ID. + /// Current prompt ID. + /// Current evaluation ID. + /// Compliance flags for logging. + /// Fidelis Workspace Id. + /// Originating source tag for the evaluation (i.e. Immersive, Logic Apps, etc.). + /// Indicates whether the evaluation is user driven or automated. + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + /// Username of the user that invoked the skill. + /// A new instance for mocking. + public static SkillContextResponse SkillContextResponse(SkillDescriptor descriptor = null, string id = null, IEnumerable featureFlags = null, IReadOnlyDictionary inputs = null, IReadOnlyDictionary properties = null, DateTimeOffset startTime = default, string tenantId = null, string userId = null, string sessionId = null, string promptId = null, string evaluationId = null, ComplianceFlags complianceFlags = null, string workspaceId = null, string source = null, EvaluationInvocationType invocationType = default, EvaluationInvocationCategory invocationCategory = default, string userName = null) + { + featureFlags ??= new List(); + inputs ??= new Dictionary(); + properties ??= new Dictionary(); + + return new SkillContextResponse(descriptor, id, featureFlags?.ToList(), inputs, properties, startTime, tenantId, userId, sessionId, promptId, evaluationId, complianceFlags, workspaceId, source, invocationType, invocationCategory, userName); + } + + /// Initializes a new instance of SkillDescriptor. + /// The skillset descriptor. + /// The name of the skill. + /// The format of the skill. + /// The display name of the skill. + /// An alternative name for the skill as some planners follow different naming convensions. This is set by the planner to map the name back to the skill. + /// The dependencies of the skill. + /// The description of the skill. + /// A list of example prompts for the skill. + /// Whether the skill is hidden TODO what does this mean. + /// The inputs required for the skill. + /// The outputs of the skill. + /// The prompt aligned name of the skill TODO what does this mean. + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + /// Controls the conditions under which the users can see or use this skillset. + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + /// Controls the conditions under a prompt can use this skillset. + /// The settings of the skill. + /// skillSummaryMetadata. + /// EnableVariableSubstitutionInCompose. + /// A new instance for mocking. + public static SkillDescriptor SkillDescriptor(SkillsetDescriptor skillset = null, string name = null, string format = null, string displayName = null, string altName = null, IEnumerable dependencies = null, string description = null, IEnumerable examplePrompts = null, bool hidden = default, IEnumerable inputs = null, IEnumerable outputs = null, string promptAlignedName = null, IEnumerable userVisibilityFeatureFlags = null, SkillVisibility userVisibility = default, IEnumerable plannerVisibilityFeatureFlags = null, SkillVisibility plannerVisibility = default, IReadOnlyDictionary settings = null, SkillSummaryDescriptor skillSummaryMetadata = null, bool enableVariableSubstitutionInCompose = default) + { + dependencies ??= new List(); + examplePrompts ??= new List(); + inputs ??= new List(); + outputs ??= new List(); + userVisibilityFeatureFlags ??= new List(); + plannerVisibilityFeatureFlags ??= new List(); + settings ??= new Dictionary(); + + return new SkillDescriptor(skillset, name, format, displayName, altName, dependencies?.ToList(), description, examplePrompts?.ToList(), hidden, inputs?.ToList(), outputs?.ToList(), promptAlignedName, userVisibilityFeatureFlags?.ToList(), userVisibility, plannerVisibilityFeatureFlags?.ToList(), plannerVisibility, settings, skillSummaryMetadata, enableVariableSubstitutionInCompose); + } + + /// Initializes a new instance of SkillsetDescriptor. + /// Namespace for the skillset. + /// The name of the Skillset. + /// The description of the Skillset. + /// The description of the skillset that's displayed TODO postman/dev figure out where this is displayed. + /// The Skillset name that's displayed in the portal. + /// The icon displayed for the skillset in the console. + /// The category of the Skillset. + /// CatalogScope of the Skillset. + /// Whether the skillset is enabled TODO how is this different than Hidden. + /// Whether the skillset is hidden TODO how is this different than enabled. + /// The prerequisites of a skillset TODO what does this mean. + /// The settings of a skillset. + /// The settings of a skillset. + /// The types of authentication supported by the skillset. + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + /// Controls the conditions under which the users can see or use this skillset. + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + /// Controls the conditions under a prompt can use this skillset. + /// The user ID of the user who created this skillset. + /// The ID of an Entra group that contains the owners for this Skillset. + /// A new instance for mocking. + public static SkillsetDescriptor SkillsetDescriptor(string @namespace = null, string name = null, string description = null, string descriptionDisplay = null, string disaplyName = null, string icon = null, SkillsetCategory category = default, SkillsetCatalogScope catalogScope = default, bool enabled = default, bool hidden = default, IEnumerable prerequisites = null, IEnumerable settings = null, SkillsetAuth authorization = null, IEnumerable supportedAuthTypes = null, IEnumerable userVisibilityFeatureFlags = null, SkillVisibility userVisibility = default, IEnumerable plannerVisibilityFeatureFlags = null, SkillVisibility plannerVisibility = default, string creatorUserId = null, string ownersGroupId = null) + { + prerequisites ??= new List(); + settings ??= new List(); + supportedAuthTypes ??= new List(); + userVisibilityFeatureFlags ??= new List(); + plannerVisibilityFeatureFlags ??= new List(); + + return new SkillsetDescriptor(@namespace, name, description, descriptionDisplay, disaplyName, icon, category, catalogScope, enabled, hidden, prerequisites?.ToList(), settings?.ToList(), authorization, supportedAuthTypes?.ToList(), userVisibilityFeatureFlags?.ToList(), userVisibility, plannerVisibilityFeatureFlags?.ToList(), plannerVisibility, creatorUserId, ownersGroupId); + } + + /// Initializes a new instance of SkillsetSetting. + /// The name of the skillset setting. + /// The label of the skillset setting. + /// The description of the skillset setting used to describe the setting to the user in an info text box. + /// The hint text used to fill in the setting box. + /// The type of the skillset setting. + /// Whether the skillset setting is required. + /// The default value of the skillset setting. + /// The value of the skillset setting. + /// , , , , or is null. + /// A new instance for mocking. + public static SkillsetSetting SkillsetSetting(string name = null, string label = null, string description = null, string hintText = null, SkillsetSettingType settingType = default, bool required = default, string defaultValue = null, string value = null) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + if (label == null) + { + throw new ArgumentNullException(nameof(label)); + } + if (description == null) + { + throw new ArgumentNullException(nameof(description)); + } + if (hintText == null) + { + throw new ArgumentNullException(nameof(hintText)); + } + if (defaultValue == null) + { + throw new ArgumentNullException(nameof(defaultValue)); + } + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + + return new SkillsetSetting(name, label, description, hintText, settingType, required, defaultValue, value); + } + + /// Initializes a new instance of SkillsetAuth. + /// SkillsetAuth Type. + /// A new instance for mocking. + public static SkillsetAuth SkillsetAuth(SkillsetAuthType type = default) + { + return new SkillsetAuth(type); + } + + /// Initializes a new instance of SkillDependencyDescriptor. + /// The skillset name. + /// The name of the skill. + /// or is null. + /// A new instance for mocking. + public static SkillDependencyDescriptor SkillDependencyDescriptor(string skillsetName = null, string skillName = null) + { + if (skillsetName == null) + { + throw new ArgumentNullException(nameof(skillsetName)); + } + if (skillName == null) + { + throw new ArgumentNullException(nameof(skillName)); + } + + return new SkillDependencyDescriptor(skillsetName, skillName); + } + + /// Initializes a new instance of SkillInputDescriptor. + /// The name of the skill input. + /// The type of the skill input. + /// The description of the skill. + /// Whether a skill input is required. + /// The default value of the skill input. + /// The placeholder value of the skill input TODO how is this different than the default. + /// Enum. + /// A new instance for mocking. + public static SkillInputDescriptor SkillInputDescriptor(string name = null, SkillTypeDescriptor type = null, string description = null, bool required = default, string defaultValue = null, string placeholderValue = null, IEnumerable @enum = null) + { + @enum ??= new List(); + + return new SkillInputDescriptor(name, type, description, required, defaultValue, placeholderValue, @enum?.ToList()); + } + + /// Initializes a new instance of SkillTypeDescriptor. + /// The name of the skill type. + /// is null. + /// A new instance for mocking. + public static SkillTypeDescriptor SkillTypeDescriptor(string name = null) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + return new SkillTypeDescriptor(name); + } + + /// Initializes a new instance of SkillOutputDescriptor. + /// The name of the skill input. + /// The type of the skill input. + /// The description of the skill. + /// A new instance for mocking. + public static SkillOutputDescriptor SkillOutputDescriptor(string name = null, SkillTypeDescriptor type = null, string description = null) + { + return new SkillOutputDescriptor(name, type, description); + } + + /// Initializes a new instance of SkillSummaryDescriptor. + /// SummaryStartMessage. + /// SummaryEndMessage. + /// or is null. + /// A new instance for mocking. + public static SkillSummaryDescriptor SkillSummaryDescriptor(string summaryStartMessage = null, string summaryEndMessage = null) + { + if (summaryStartMessage == null) + { + throw new ArgumentNullException(nameof(summaryStartMessage)); + } + if (summaryEndMessage == null) + { + throw new ArgumentNullException(nameof(summaryEndMessage)); + } + + return new SkillSummaryDescriptor(summaryStartMessage, summaryEndMessage); + } + + /// Initializes a new instance of ComplianceFlags. + /// Whether to record logs in Geneva and Kusto for this user. + /// Locked down tables not required and non-customer content table does not have to be redacted. + /// When this is true, the data may be used for model improvement. This flag does not affect redaction. + /// A new instance for mocking. + public static ComplianceFlags ComplianceFlags(bool recordLog = default, bool customerOptedInToEyesOnProductImprovement = default, bool customerOptedInToModelImprovement = default) + { + return new ComplianceFlags(recordLog, customerOptedInToEyesOnProductImprovement, customerOptedInToModelImprovement); + } + + /// Initializes a new instance of MedeinaExecutionContext. + /// The session id. + /// The prompt id. + /// The evaluation id. + /// The tenant id. + /// The account id. + /// The workspace id. + /// The display name of the user. + /// The Application Id that created the Session. + /// The Source tag i.e. 'immersive'. + /// The source application ID. + /// The selected skills. + /// The skillsets identified for execution during the evaluation process post skill selection. + /// Indicates whether the context is for a user onboarded to Fidelis. + /// Indicates whether the evaluation is manually generated or user driven. + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + /// The encrypted token used to authenticate the user. + /// Compliance flags for logging. + /// Contains the context for the Azure OpenAI requests such as the deployment id. + /// Preview state of the execution context. + /// A new instance for mocking. + public static MedeinaExecutionContext MedeinaExecutionContext(string sessionId = null, string promptId = null, string evaluationId = null, string tenantId = null, string accountId = null, string workspaceId = null, string userName = null, string applicationId = null, string source = null, string unauthenticatedSourceApplicationId = null, string selectedSkills = null, IEnumerable selectedSkillsets = null, bool isFidelisUser = default, EvaluationInvocationType invocationType = default, EvaluationInvocationCategory invocationCategory = default, string encryptedUserAccessToken = null, ComplianceFlags complianceFlags = null, AzureOpenAIExecutionContext azureOpenAIExecutionContext = null, SkillPreviewState previewState = default) + { + selectedSkillsets ??= new List(); + + return new MedeinaExecutionContext(sessionId, promptId, evaluationId, tenantId, accountId, workspaceId, userName, applicationId, source, unauthenticatedSourceApplicationId, selectedSkills, selectedSkillsets?.ToList(), isFidelisUser, invocationType, invocationCategory, encryptedUserAccessToken, complianceFlags, azureOpenAIExecutionContext, previewState); + } + + /// Initializes a new instance of PromptHistoryResponse. + /// List of prompts that have been evaluated in the current session. + /// A new instance for mocking. + public static PromptHistoryResponse PromptHistoryResponse(IEnumerable prompts = null) + { + prompts ??= new List(); + + return new PromptHistoryResponse(prompts?.ToList()); + } + + /// Initializes a new instance of SessionPrompt. + /// The content of the prompt. + /// Prompt response returned by the prompt evaluation. + /// is null. + /// A new instance for mocking. + public static SessionPrompt SessionPrompt(string prompt = null, string response = null) + { + if (prompt == null) + { + throw new ArgumentNullException(nameof(prompt)); + } + + return new SessionPrompt(prompt, response); + } + + /// Initializes a new instance of AuthDetails. + /// Auth Location. + /// Auth Info. + /// is null. + /// A new instance for mocking. + public static AuthDetails AuthDetails(AuthLocationEnum authLocation = default, IReadOnlyDictionary authInfo = null) + { + authInfo ??= new Dictionary(); + + return new AuthDetails(authLocation, authInfo); + } + + /// Initializes a new instance of AccessToken. + /// Token string. + /// Expiry time. + /// is null. + /// A new instance for mocking. + public static AccessToken AccessToken(string token = null, DateTimeOffset expiresOn = default) + { + if (token == null) + { + throw new ArgumentNullException(nameof(token)); + } + + return new AccessToken(token, expiresOn); + } + + /// Initializes a new instance of ChatCompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + /// List of choices in the chat completion response. + /// A new instance for mocking. + public static ChatCompletionResponse ChatCompletionResponse(string id = null, string @object = null, DateTimeOffset created = default, string model = null, BinaryData usage = null, IEnumerable promptFilterResults = null, IEnumerable choices = null) + { + promptFilterResults ??= new List(); + choices ??= new List(); + + return new ChatCompletionResponse(id, @object, created, model, usage, promptFilterResults?.ToList(), choices?.ToList()); + } + + /// Initializes a new instance of ChatChoice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// This object contains the list of content filter annotations. + /// This indicates when the content filtering system does not run on the chat completion. + /// The message associated with the chat choice. + /// A new instance for mocking. + public static ChatChoice ChatChoice(int index = default, BinaryData logProbs = null, string finishReason = null, BinaryData contentFilterResults = null, BinaryData contentFilterError = null, Message message = null) + { + return new ChatChoice(index, logProbs, finishReason, contentFilterResults, contentFilterError, message); + } + + /// Initializes a new instance of Choice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// This object contains the list of content filter annotations. + /// This indicates when the content filtering system does not run on the chat completion. + /// + /// A new instance for mocking. + public static Choice Choice(int index = default, BinaryData logProbs = null, string finishReason = null, BinaryData contentFilterResults = null, BinaryData contentFilterError = null, string text = null) + { + return new Choice(index, logProbs, finishReason, contentFilterResults, contentFilterError, text); + } + + /// Initializes a new instance of CompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + /// + /// A new instance for mocking. + public static CompletionResponse CompletionResponse(string id = null, string @object = null, DateTimeOffset created = default, string model = null, BinaryData usage = null, IEnumerable promptFilterResults = null, IEnumerable choices = null) + { + promptFilterResults ??= new List(); + choices ??= new List(); + + return new CompletionResponse(id, @object, created, model, usage, promptFilterResults?.ToList(), choices?.ToList()); + } + + /// Initializes a new instance of EmbeddingResponse. + /// + /// + /// + /// + /// A new instance for mocking. + public static EmbeddingResponse EmbeddingResponse(IEnumerable data = null, string model = null, string @object = null, BinaryData usage = null) + { + data ??= new List(); + + return new EmbeddingResponse(data?.ToList(), model, @object, usage); + } + + /// Initializes a new instance of EmbeddingData. + /// + /// + /// + /// A new instance for mocking. + public static EmbeddingData EmbeddingData(IEnumerable embedding = null, int index = default, string @object = null) + { + embedding ??= new List(); + + return new EmbeddingData(embedding?.ToList(), index, @object); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.Serialization.cs new file mode 100644 index 000000000000..2e1ad14ec9b8 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class AccessToken + { + internal static AccessToken DeserializeAccessToken(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string token = default; + DateTimeOffset expiresOn = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("token"u8)) + { + token = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresOn"u8)) + { + expiresOn = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new AccessToken(token, expiresOn); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AccessToken FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAccessToken(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.cs new file mode 100644 index 000000000000..b87c812de578 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AccessToken.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// AccessToken. + public partial class AccessToken + { + /// Initializes a new instance of AccessToken. + /// Token string. + /// Expiry time. + /// is null. + internal AccessToken(string token, DateTimeOffset expiresOn) + { + Argument.AssertNotNull(token, nameof(token)); + + Token = token; + ExpiresOn = expiresOn; + } + + /// Token string. + public string Token { get; } + /// Expiry time. + public DateTimeOffset ExpiresOn { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.Serialization.cs new file mode 100644 index 000000000000..93bf377601f6 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class AddSourceRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("SkillSource"u8); + writer.WriteObjectValue(SkillSource); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.cs new file mode 100644 index 000000000000..47b314d4d8c5 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourceRequest.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// AddSourceRequest. + public partial class AddSourceRequest + { + /// Initializes a new instance of AddSourceRequest. + /// SkillSource. + /// is null. + public AddSourceRequest(SkillSource skillSource) + { + Argument.AssertNotNull(skillSource, nameof(skillSource)); + + SkillSource = skillSource; + } + + /// SkillSource. + public SkillSource SkillSource { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.Serialization.cs new file mode 100644 index 000000000000..c70001c3d09e --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class AddSourcesRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("sources"u8); + writer.WriteStartArray(); + foreach (var item in Sources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.cs new file mode 100644 index 000000000000..3cbcd167cdc0 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSourcesRequest.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// AddSourcesRequest. + public partial class AddSourcesRequest + { + /// Initializes a new instance of AddSourcesRequest. + /// List of SkillSource. + /// is null. + public AddSourcesRequest(IEnumerable sources) + { + Argument.AssertNotNull(sources, nameof(sources)); + + Sources = sources.ToList(); + } + + /// Initializes a new instance of AddSourcesRequest. + /// List of SkillSource. + internal AddSourcesRequest(IList sources) + { + Sources = sources; + } + + /// List of SkillSource. + public IList Sources { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.Serialization.cs new file mode 100644 index 000000000000..def9956dc864 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class AddSuggestedPromptsRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("suggestedPrompts"u8); + writer.WriteStartArray(); + foreach (var item in SuggestedPrompts) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.cs new file mode 100644 index 000000000000..1feddb17ffae --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AddSuggestedPromptsRequest.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// AddSuggestedPromptsRequest. + public partial class AddSuggestedPromptsRequest + { + /// Initializes a new instance of AddSuggestedPromptsRequest. + /// List of SuggestedPrompt. + /// is null. + public AddSuggestedPromptsRequest(IEnumerable suggestedPrompts) + { + Argument.AssertNotNull(suggestedPrompts, nameof(suggestedPrompts)); + + SuggestedPrompts = suggestedPrompts.ToList(); + } + + /// Initializes a new instance of AddSuggestedPromptsRequest. + /// List of SuggestedPrompt. + internal AddSuggestedPromptsRequest(IList suggestedPrompts) + { + SuggestedPrompts = suggestedPrompts; + } + + /// List of SuggestedPrompt. + public IList SuggestedPrompts { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.Serialization.cs new file mode 100644 index 000000000000..65f7be672d00 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class AuthDetails + { + internal static AuthDetails DeserializeAuthDetails(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AuthLocationEnum authLocation = default; + IReadOnlyDictionary authInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authLocation"u8)) + { + authLocation = new AuthLocationEnum(property.Value.GetString()); + continue; + } + if (property.NameEquals("authInfo"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + authInfo = dictionary; + continue; + } + } + return new AuthDetails(authLocation, authInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AuthDetails FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAuthDetails(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.cs new file mode 100644 index 000000000000..a1950a6a962b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthDetails.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Auth Details. + public partial class AuthDetails + { + /// Initializes a new instance of AuthDetails. + /// Auth Location. + /// Auth Info. + /// is null. + internal AuthDetails(AuthLocationEnum authLocation, IReadOnlyDictionary authInfo) + { + Argument.AssertNotNull(authInfo, nameof(authInfo)); + + AuthLocation = authLocation; + AuthInfo = authInfo; + } + + /// Auth Location. + public AuthLocationEnum AuthLocation { get; } + /// Auth Info. + public IReadOnlyDictionary AuthInfo { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthLocationEnum.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthLocationEnum.cs new file mode 100644 index 000000000000..aa3e0cbcc274 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AuthLocationEnum.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Auth Location. + public readonly partial struct AuthLocationEnum : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AuthLocationEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HeaderValue = "Header"; + private const string QueryParamsValue = "QueryParams"; + + /// Using Header. + public static AuthLocationEnum Header { get; } = new AuthLocationEnum(HeaderValue); + /// Using QueryParams. + public static AuthLocationEnum QueryParams { get; } = new AuthLocationEnum(QueryParamsValue); + /// Determines if two values are the same. + public static bool operator ==(AuthLocationEnum left, AuthLocationEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AuthLocationEnum left, AuthLocationEnum right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AuthLocationEnum(string value) => new AuthLocationEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AuthLocationEnum other && Equals(other); + /// + public bool Equals(AuthLocationEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.Serialization.cs new file mode 100644 index 000000000000..1717a03c8c10 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class AzureOpenAIExecutionContext : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("ApiVersion"u8); + writer.WriteStringValue(ApiVersion); + writer.WritePropertyName("Environment"u8); + writer.WriteStringValue(Environment); + writer.WritePropertyName("IsGPUProxyEnabled"u8); + writer.WriteBooleanValue(IsGPUProxyEnabled); + if (Optional.IsDefined(GpuProcessingGeo)) + { + writer.WritePropertyName("GpuProcessingGeo"u8); + writer.WriteStringValue(GpuProcessingGeo); + } + writer.WritePropertyName("CustomerAllowCrossGeoCompute"u8); + writer.WriteBooleanValue(CustomerAllowCrossGeoCompute); + writer.WritePropertyName("EcsAllowCrossGeoCompute"u8); + writer.WriteBooleanValue(EcsAllowCrossGeoCompute); + if (Optional.IsCollectionDefined(ContentFilterProperties)) + { + writer.WritePropertyName("ContentFilterProperties"u8); + writer.WriteStartObject(); + foreach (var item in ContentFilterProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ReportingProperties)) + { + writer.WritePropertyName("ReportingProperties"u8); + writer.WriteStartObject(); + foreach (var item in ReportingProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static AzureOpenAIExecutionContext DeserializeAzureOpenAIExecutionContext(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apiVersion = default; + string environment = default; + bool isGPUProxyEnabled = default; + Optional gpuProcessingGeo = default; + bool customerAllowCrossGeoCompute = default; + bool ecsAllowCrossGeoCompute = default; + Optional> contentFilterProperties = default; + Optional> reportingProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ApiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("Environment"u8)) + { + environment = property.Value.GetString(); + continue; + } + if (property.NameEquals("IsGPUProxyEnabled"u8)) + { + isGPUProxyEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("GpuProcessingGeo"u8)) + { + gpuProcessingGeo = property.Value.GetString(); + continue; + } + if (property.NameEquals("CustomerAllowCrossGeoCompute"u8)) + { + customerAllowCrossGeoCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("EcsAllowCrossGeoCompute"u8)) + { + ecsAllowCrossGeoCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("ContentFilterProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + contentFilterProperties = dictionary; + continue; + } + if (property.NameEquals("ReportingProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + reportingProperties = dictionary; + continue; + } + } + return new AzureOpenAIExecutionContext(apiVersion, environment, isGPUProxyEnabled, gpuProcessingGeo.Value, customerAllowCrossGeoCompute, ecsAllowCrossGeoCompute, Optional.ToDictionary(contentFilterProperties), Optional.ToDictionary(reportingProperties)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AzureOpenAIExecutionContext FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAzureOpenAIExecutionContext(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.cs new file mode 100644 index 000000000000..18cf4ec52c5c --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/AzureOpenAIExecutionContext.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents the Azure OpenAI execution context. + public partial class AzureOpenAIExecutionContext + { + /// Initializes a new instance of AzureOpenAIExecutionContext. + /// The API version. + /// The environment where the request is being made. + /// Determines if the GPU proxy is enabled. + /// Whether the customer allows cross-geo compute in their workspace capacity. + /// ECS controlled flag to allow cross-geo compute. + /// or is null. + public AzureOpenAIExecutionContext(string apiVersion, string environment, bool isGPUProxyEnabled, bool customerAllowCrossGeoCompute, bool ecsAllowCrossGeoCompute) + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(environment, nameof(environment)); + + ApiVersion = apiVersion; + Environment = environment; + IsGPUProxyEnabled = isGPUProxyEnabled; + CustomerAllowCrossGeoCompute = customerAllowCrossGeoCompute; + EcsAllowCrossGeoCompute = ecsAllowCrossGeoCompute; + ContentFilterProperties = new ChangeTrackingDictionary(); + ReportingProperties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of AzureOpenAIExecutionContext. + /// The API version. + /// The environment where the request is being made. + /// Determines if the GPU proxy is enabled. + /// The geographic location where the GPU processing is being done. + /// Whether the customer allows cross-geo compute in their workspace capacity. + /// ECS controlled flag to allow cross-geo compute. + /// Properties used to add content prompt and content filter details from the response. + /// Properties used to report information about the skill invocation. Must not contain customer content. + internal AzureOpenAIExecutionContext(string apiVersion, string environment, bool isGPUProxyEnabled, string gpuProcessingGeo, bool customerAllowCrossGeoCompute, bool ecsAllowCrossGeoCompute, IDictionary contentFilterProperties, IDictionary reportingProperties) + { + ApiVersion = apiVersion; + Environment = environment; + IsGPUProxyEnabled = isGPUProxyEnabled; + GpuProcessingGeo = gpuProcessingGeo; + CustomerAllowCrossGeoCompute = customerAllowCrossGeoCompute; + EcsAllowCrossGeoCompute = ecsAllowCrossGeoCompute; + ContentFilterProperties = contentFilterProperties; + ReportingProperties = reportingProperties; + } + + /// The API version. + public string ApiVersion { get; set; } + /// The environment where the request is being made. + public string Environment { get; set; } + /// Determines if the GPU proxy is enabled. + public bool IsGPUProxyEnabled { get; set; } + /// The geographic location where the GPU processing is being done. + public string GpuProcessingGeo { get; set; } + /// Whether the customer allows cross-geo compute in their workspace capacity. + public bool CustomerAllowCrossGeoCompute { get; set; } + /// ECS controlled flag to allow cross-geo compute. + public bool EcsAllowCrossGeoCompute { get; set; } + /// Properties used to add content prompt and content filter details from the response. + public IDictionary ContentFilterProperties { get; } + /// Properties used to report information about the skill invocation. Must not contain customer content. + public IDictionary ReportingProperties { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseChoice.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseChoice.cs new file mode 100644 index 000000000000..487ee931a829 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseChoice.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The BaseChoice. + public partial class BaseChoice + { + /// Initializes a new instance of BaseChoice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// or is null. + internal BaseChoice(int index, BinaryData logProbs, string finishReason) + { + Argument.AssertNotNull(logProbs, nameof(logProbs)); + Argument.AssertNotNull(finishReason, nameof(finishReason)); + + Index = index; + LogProbs = logProbs; + FinishReason = finishReason; + } + + /// Initializes a new instance of BaseChoice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// This object contains the list of content filter annotations. + /// This indicates when the content filtering system does not run on the chat completion. + internal BaseChoice(int index, BinaryData logProbs, string finishReason, BinaryData contentFilterResults, BinaryData contentFilterError) + { + Index = index; + LogProbs = logProbs; + FinishReason = finishReason; + ContentFilterResults = contentFilterResults; + ContentFilterError = contentFilterError; + } + + /// Gets the index. + public int Index { get; } + /// + /// Log probabilities for this choice. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData LogProbs { get; } + /// The reason why the operation finished. + public string FinishReason { get; } + /// + /// This object contains the list of content filter annotations. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData ContentFilterResults { get; } + /// + /// This indicates when the content filtering system does not run on the chat completion. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData ContentFilterError { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionRequest.cs new file mode 100644 index 000000000000..e606657c249b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionRequest.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents the base completion request with common parameters. + public partial class BaseCompletionRequest + { + /// Initializes a new instance of BaseCompletionRequest. + /// Stop sequences to terminate generation. + /// Adjusts likelihood of specific tokens. + /// The response format specification. + /// , or is null. + internal BaseCompletionRequest(IEnumerable stop, IReadOnlyDictionary logitBias, BinaryData responseFormat) + { + Argument.AssertNotNull(stop, nameof(stop)); + Argument.AssertNotNull(logitBias, nameof(logitBias)); + Argument.AssertNotNull(responseFormat, nameof(responseFormat)); + + Stop = stop.ToList(); + LogitBias = logitBias; + ResponseFormat = responseFormat; + } + + /// Initializes a new instance of BaseCompletionRequest. + /// The maximum number of tokens to generate. + /// The sampling temperature to use. + /// The nucleus sampling parameter. + /// The number of completions to generate. + /// Specifies whether to stream the response. + /// The number of log probabilities to include. + /// Whether to include the prompt in the output. + /// Stop sequences to terminate generation. + /// The penalty for repeating words in the presence. + /// The penalty for repeating tokens. + /// The number of completions to choose the best from. + /// Adjusts likelihood of specific tokens. + /// The response format specification. + internal BaseCompletionRequest(int? maxTokens, double? temperature, double? topP, int? n, bool? stream, int? logprobs, bool? echo, IReadOnlyList stop, double? presencePenalty, double? frequencyPenalty, int? bestOf, IReadOnlyDictionary logitBias, BinaryData responseFormat) + { + MaxTokens = maxTokens; + Temperature = temperature; + TopP = topP; + N = n; + Stream = stream; + Logprobs = logprobs; + Echo = echo; + Stop = stop; + PresencePenalty = presencePenalty; + FrequencyPenalty = frequencyPenalty; + BestOf = bestOf; + LogitBias = logitBias; + ResponseFormat = responseFormat; + } + + /// The maximum number of tokens to generate. + public int? MaxTokens { get; } + /// The sampling temperature to use. + public double? Temperature { get; } + /// The nucleus sampling parameter. + public double? TopP { get; } + /// The number of completions to generate. + public int? N { get; } + /// Specifies whether to stream the response. + public bool? Stream { get; } + /// The number of log probabilities to include. + public int? Logprobs { get; } + /// Whether to include the prompt in the output. + public bool? Echo { get; } + /// Stop sequences to terminate generation. + public IReadOnlyList Stop { get; } + /// The penalty for repeating words in the presence. + public double? PresencePenalty { get; } + /// The penalty for repeating tokens. + public double? FrequencyPenalty { get; } + /// The number of completions to choose the best from. + public int? BestOf { get; } + /// Adjusts likelihood of specific tokens. + public IReadOnlyDictionary LogitBias { get; } + /// + /// The response format specification. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData ResponseFormat { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionResponse.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionResponse.cs new file mode 100644 index 000000000000..bb50d60c448a --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/BaseCompletionResponse.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents the base completion response. + public partial class BaseCompletionResponse + { + /// Initializes a new instance of BaseCompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + /// , , , or is null. + internal BaseCompletionResponse(string id, string @object, DateTimeOffset created, string model, BinaryData usage, IEnumerable promptFilterResults) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(@object, nameof(@object)); + Argument.AssertNotNull(model, nameof(model)); + Argument.AssertNotNull(usage, nameof(usage)); + Argument.AssertNotNull(promptFilterResults, nameof(promptFilterResults)); + + Id = id; + Object = @object; + Created = created; + Model = model; + Usage = usage; + PromptFilterResults = promptFilterResults.ToList(); + } + + /// Initializes a new instance of BaseCompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + internal BaseCompletionResponse(string id, string @object, DateTimeOffset created, string model, BinaryData usage, IReadOnlyList promptFilterResults) + { + Id = id; + Object = @object; + Created = created; + Model = model; + Usage = usage; + PromptFilterResults = promptFilterResults; + } + + /// The unique identifier for the response. + public string Id { get; } + /// The object type. + public string Object { get; } + /// The creation timestamp. + public DateTimeOffset Created { get; } + /// The model used for completion. + public string Model { get; } + /// + /// The usage statistics for the response. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Usage { get; } + /// + /// The results of prompt filtering. + /// + /// To assign an object to the element of this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IReadOnlyList PromptFilterResults { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.Serialization.cs new file mode 100644 index 000000000000..19ffaa37de28 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class ChatChoice + { + internal static ChatChoice DeserializeChatChoice(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Message message = default; + int index = default; + BinaryData logProbs = default; + string finishReason = default; + Optional contentFilterResults = default; + Optional contentFilterError = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Message"u8)) + { + message = Message.DeserializeMessage(property.Value); + continue; + } + if (property.NameEquals("Index"u8)) + { + index = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("LogProbs"u8)) + { + logProbs = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("FinishReason"u8)) + { + finishReason = property.Value.GetString(); + continue; + } + if (property.NameEquals("ContentFilterResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentFilterResults = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("ContentFilterError"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentFilterError = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + } + return new ChatChoice(index, logProbs, finishReason, contentFilterResults.Value, contentFilterError.Value, message); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatChoice FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeChatChoice(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.cs new file mode 100644 index 000000000000..467997faab40 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatChoice.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The ChatChoice. + public partial class ChatChoice : BaseChoice + { + /// Initializes a new instance of ChatChoice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// The message associated with the chat choice. + /// , or is null. + internal ChatChoice(int index, BinaryData logProbs, string finishReason, Message message) : base(index, logProbs, finishReason) + { + Argument.AssertNotNull(logProbs, nameof(logProbs)); + Argument.AssertNotNull(finishReason, nameof(finishReason)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; + } + + /// Initializes a new instance of ChatChoice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// This object contains the list of content filter annotations. + /// This indicates when the content filtering system does not run on the chat completion. + /// The message associated with the chat choice. + internal ChatChoice(int index, BinaryData logProbs, string finishReason, BinaryData contentFilterResults, BinaryData contentFilterError, Message message) : base(index, logProbs, finishReason, contentFilterResults, contentFilterError) + { + Message = message; + } + + /// The message associated with the chat choice. + public Message Message { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.Serialization.cs new file mode 100644 index 000000000000..0a00f6b60bbc --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class ChatCompletionRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Messages"u8); + writer.WriteStartArray(); + foreach (var item in Messages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("Functions"u8); + writer.WriteStartArray(); + foreach (var item in Functions) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("FunctionCall"u8); + writer.WriteStringValue(FunctionCall); + if (Optional.IsCollectionDefined(Tools)) + { + writer.WritePropertyName("Tools"u8); + writer.WriteStartArray(); + foreach (var item in Tools) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ToolChoice)) + { + writer.WritePropertyName("ToolChoice"u8); + writer.WriteStringValue(ToolChoice); + } + if (Optional.IsDefined(ParallelToolCalls)) + { + writer.WritePropertyName("ParallelToolCalls"u8); + writer.WriteBooleanValue(ParallelToolCalls.Value); + } + if (Optional.IsDefined(MaxTokens)) + { + writer.WritePropertyName("MaxTokens"u8); + writer.WriteNumberValue(MaxTokens.Value); + } + if (Optional.IsDefined(Temperature)) + { + writer.WritePropertyName("Temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + if (Optional.IsDefined(TopP)) + { + writer.WritePropertyName("TopP"u8); + writer.WriteNumberValue(TopP.Value); + } + if (Optional.IsDefined(N)) + { + writer.WritePropertyName("N"u8); + writer.WriteNumberValue(N.Value); + } + if (Optional.IsDefined(Stream)) + { + writer.WritePropertyName("Stream"u8); + writer.WriteBooleanValue(Stream.Value); + } + if (Optional.IsDefined(Logprobs)) + { + writer.WritePropertyName("Logprobs"u8); + writer.WriteNumberValue(Logprobs.Value); + } + if (Optional.IsDefined(Echo)) + { + writer.WritePropertyName("Echo"u8); + writer.WriteBooleanValue(Echo.Value); + } + writer.WritePropertyName("Stop"u8); + writer.WriteStartArray(); + foreach (var item in Stop) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(PresencePenalty)) + { + writer.WritePropertyName("PresencePenalty"u8); + writer.WriteNumberValue(PresencePenalty.Value); + } + if (Optional.IsDefined(FrequencyPenalty)) + { + writer.WritePropertyName("FrequencyPenalty"u8); + writer.WriteNumberValue(FrequencyPenalty.Value); + } + if (Optional.IsDefined(BestOf)) + { + writer.WritePropertyName("BestOf"u8); + writer.WriteNumberValue(BestOf.Value); + } + writer.WritePropertyName("LogitBias"u8); + writer.WriteStartObject(); + foreach (var item in LogitBias) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("ResponseFormat"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(ResponseFormat.ToString()).RootElement); +#endif + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.cs new file mode 100644 index 000000000000..b9943be08f8b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionRequest.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a chat completion request. + public partial class ChatCompletionRequest : BaseCompletionRequest + { + /// Initializes a new instance of ChatCompletionRequest. + /// Stop sequences to terminate generation. + /// Adjusts likelihood of specific tokens. + /// The response format specification. + /// The messages associated with the request. + /// The functions associated with the request. + /// Specifies the function to call. + /// , , , , or is null. + public ChatCompletionRequest(IEnumerable stop, IReadOnlyDictionary logitBias, BinaryData responseFormat, IEnumerable messages, IEnumerable functions, string functionCall) : base(stop, logitBias, responseFormat) + { + Argument.AssertNotNull(stop, nameof(stop)); + Argument.AssertNotNull(logitBias, nameof(logitBias)); + Argument.AssertNotNull(responseFormat, nameof(responseFormat)); + Argument.AssertNotNull(messages, nameof(messages)); + Argument.AssertNotNull(functions, nameof(functions)); + Argument.AssertNotNull(functionCall, nameof(functionCall)); + + Messages = messages.ToList(); + Functions = functions.ToList(); + FunctionCall = functionCall; + Tools = new ChangeTrackingList(); + } + + /// Initializes a new instance of ChatCompletionRequest. + /// The maximum number of tokens to generate. + /// The sampling temperature to use. + /// The nucleus sampling parameter. + /// The number of completions to generate. + /// Specifies whether to stream the response. + /// The number of log probabilities to include. + /// Whether to include the prompt in the output. + /// Stop sequences to terminate generation. + /// The penalty for repeating words in the presence. + /// The penalty for repeating tokens. + /// The number of completions to choose the best from. + /// Adjusts likelihood of specific tokens. + /// The response format specification. + /// The messages associated with the request. + /// The functions associated with the request. + /// Specifies the function to call. + /// The tools available for this request. + /// The selected tool for execution. + /// Indicates whether tools can be called in parallel. + internal ChatCompletionRequest(int? maxTokens, double? temperature, double? topP, int? n, bool? stream, int? logprobs, bool? echo, IReadOnlyList stop, double? presencePenalty, double? frequencyPenalty, int? bestOf, IReadOnlyDictionary logitBias, BinaryData responseFormat, IList messages, IList functions, string functionCall, IList tools, string toolChoice, bool? parallelToolCalls) : base(maxTokens, temperature, topP, n, stream, logprobs, echo, stop, presencePenalty, frequencyPenalty, bestOf, logitBias, responseFormat) + { + Messages = messages; + Functions = functions; + FunctionCall = functionCall; + Tools = tools; + ToolChoice = toolChoice; + ParallelToolCalls = parallelToolCalls; + } + + /// The messages associated with the request. + public IList Messages { get; } + /// The functions associated with the request. + public IList Functions { get; } + /// Specifies the function to call. + public string FunctionCall { get; } + /// The tools available for this request. + public IList Tools { get; } + /// The selected tool for execution. + public string ToolChoice { get; set; } + /// Indicates whether tools can be called in parallel. + public bool? ParallelToolCalls { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.Serialization.cs new file mode 100644 index 000000000000..4ad3bae15c8f --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class ChatCompletionResponse + { + internal static ChatCompletionResponse DeserializeChatCompletionResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList choices = default; + string id = default; + string @object = default; + DateTimeOffset created = default; + string model = default; + BinaryData usage = default; + IReadOnlyList promptFilterResults = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Choices"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ChatChoice.DeserializeChatChoice(item)); + } + choices = array; + continue; + } + if (property.NameEquals("Id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("Object"u8)) + { + @object = property.Value.GetString(); + continue; + } + if (property.NameEquals("Created"u8)) + { + created = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("Model"u8)) + { + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("Usage"u8)) + { + usage = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("PromptFilterResults"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(BinaryData.FromString(item.GetRawText())); + } + } + promptFilterResults = array; + continue; + } + } + return new ChatCompletionResponse(id, @object, created, model, usage, promptFilterResults, choices); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatCompletionResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeChatCompletionResponse(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.cs new file mode 100644 index 000000000000..4ed4aba62252 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ChatCompletionResponse.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; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The ChatCompletionResponse. + public partial class ChatCompletionResponse : BaseCompletionResponse + { + /// Initializes a new instance of ChatCompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + /// List of choices in the chat completion response. + /// , , , , or is null. + internal ChatCompletionResponse(string id, string @object, DateTimeOffset created, string model, BinaryData usage, IEnumerable promptFilterResults, IEnumerable choices) : base(id, @object, created, model, usage, promptFilterResults) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(@object, nameof(@object)); + Argument.AssertNotNull(model, nameof(model)); + Argument.AssertNotNull(usage, nameof(usage)); + Argument.AssertNotNull(promptFilterResults, nameof(promptFilterResults)); + Argument.AssertNotNull(choices, nameof(choices)); + + Choices = choices.ToList(); + } + + /// Initializes a new instance of ChatCompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + /// List of choices in the chat completion response. + internal ChatCompletionResponse(string id, string @object, DateTimeOffset created, string model, BinaryData usage, IReadOnlyList promptFilterResults, IReadOnlyList choices) : base(id, @object, created, model, usage, promptFilterResults) + { + Choices = choices; + } + + /// List of choices in the chat completion response. + public IReadOnlyList Choices { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.Serialization.cs new file mode 100644 index 000000000000..dcddfe8ec553 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class Choice + { + internal static Choice DeserializeChoice(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + int index = default; + BinaryData logProbs = default; + string finishReason = default; + Optional contentFilterResults = default; + Optional contentFilterError = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("Index"u8)) + { + index = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("LogProbs"u8)) + { + logProbs = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("FinishReason"u8)) + { + finishReason = property.Value.GetString(); + continue; + } + if (property.NameEquals("ContentFilterResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentFilterResults = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("ContentFilterError"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentFilterError = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + } + return new Choice(index, logProbs, finishReason, contentFilterResults.Value, contentFilterError.Value, text); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static Choice FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeChoice(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.cs new file mode 100644 index 000000000000..7a2e816bf1d7 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Choice.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The Choice. + public partial class Choice : BaseChoice + { + /// Initializes a new instance of Choice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// + /// , or is null. + internal Choice(int index, BinaryData logProbs, string finishReason, string text) : base(index, logProbs, finishReason) + { + Argument.AssertNotNull(logProbs, nameof(logProbs)); + Argument.AssertNotNull(finishReason, nameof(finishReason)); + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + } + + /// Initializes a new instance of Choice. + /// + /// Log probabilities for this choice. + /// The reason why the operation finished. + /// This object contains the list of content filter annotations. + /// This indicates when the content filtering system does not run on the chat completion. + /// + internal Choice(int index, BinaryData logProbs, string finishReason, BinaryData contentFilterResults, BinaryData contentFilterError, string text) : base(index, logProbs, finishReason, contentFilterResults, contentFilterError) + { + Text = text; + } + + /// Gets the text. + public string Text { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.Serialization.cs new file mode 100644 index 000000000000..4bbd1ae3c383 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class CompletionRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Prompt"u8); + writer.WriteStringValue(Prompt); + if (Optional.IsDefined(MaxTokens)) + { + writer.WritePropertyName("MaxTokens"u8); + writer.WriteNumberValue(MaxTokens.Value); + } + if (Optional.IsDefined(Temperature)) + { + writer.WritePropertyName("Temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + if (Optional.IsDefined(TopP)) + { + writer.WritePropertyName("TopP"u8); + writer.WriteNumberValue(TopP.Value); + } + if (Optional.IsDefined(N)) + { + writer.WritePropertyName("N"u8); + writer.WriteNumberValue(N.Value); + } + if (Optional.IsDefined(Stream)) + { + writer.WritePropertyName("Stream"u8); + writer.WriteBooleanValue(Stream.Value); + } + if (Optional.IsDefined(Logprobs)) + { + writer.WritePropertyName("Logprobs"u8); + writer.WriteNumberValue(Logprobs.Value); + } + if (Optional.IsDefined(Echo)) + { + writer.WritePropertyName("Echo"u8); + writer.WriteBooleanValue(Echo.Value); + } + writer.WritePropertyName("Stop"u8); + writer.WriteStartArray(); + foreach (var item in Stop) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(PresencePenalty)) + { + writer.WritePropertyName("PresencePenalty"u8); + writer.WriteNumberValue(PresencePenalty.Value); + } + if (Optional.IsDefined(FrequencyPenalty)) + { + writer.WritePropertyName("FrequencyPenalty"u8); + writer.WriteNumberValue(FrequencyPenalty.Value); + } + if (Optional.IsDefined(BestOf)) + { + writer.WritePropertyName("BestOf"u8); + writer.WriteNumberValue(BestOf.Value); + } + writer.WritePropertyName("LogitBias"u8); + writer.WriteStartObject(); + foreach (var item in LogitBias) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("ResponseFormat"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ResponseFormat); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(ResponseFormat.ToString()).RootElement); +#endif + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.cs new file mode 100644 index 000000000000..7526e782b619 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionRequest.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The CompletionRequest. + public partial class CompletionRequest : BaseCompletionRequest + { + /// Initializes a new instance of CompletionRequest. + /// Stop sequences to terminate generation. + /// Adjusts likelihood of specific tokens. + /// The response format specification. + /// + /// , , or is null. + public CompletionRequest(IEnumerable stop, IReadOnlyDictionary logitBias, BinaryData responseFormat, string prompt) : base(stop, logitBias, responseFormat) + { + Argument.AssertNotNull(stop, nameof(stop)); + Argument.AssertNotNull(logitBias, nameof(logitBias)); + Argument.AssertNotNull(responseFormat, nameof(responseFormat)); + Argument.AssertNotNull(prompt, nameof(prompt)); + + Prompt = prompt; + } + + /// Initializes a new instance of CompletionRequest. + /// The maximum number of tokens to generate. + /// The sampling temperature to use. + /// The nucleus sampling parameter. + /// The number of completions to generate. + /// Specifies whether to stream the response. + /// The number of log probabilities to include. + /// Whether to include the prompt in the output. + /// Stop sequences to terminate generation. + /// The penalty for repeating words in the presence. + /// The penalty for repeating tokens. + /// The number of completions to choose the best from. + /// Adjusts likelihood of specific tokens. + /// The response format specification. + /// + internal CompletionRequest(int? maxTokens, double? temperature, double? topP, int? n, bool? stream, int? logprobs, bool? echo, IReadOnlyList stop, double? presencePenalty, double? frequencyPenalty, int? bestOf, IReadOnlyDictionary logitBias, BinaryData responseFormat, string prompt) : base(maxTokens, temperature, topP, n, stream, logprobs, echo, stop, presencePenalty, frequencyPenalty, bestOf, logitBias, responseFormat) + { + Prompt = prompt; + } + + /// Gets the prompt. + public string Prompt { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.Serialization.cs new file mode 100644 index 000000000000..a4e5bef324da --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class CompletionResponse + { + internal static CompletionResponse DeserializeCompletionResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList choices = default; + string id = default; + string @object = default; + DateTimeOffset created = default; + string model = default; + BinaryData usage = default; + IReadOnlyList promptFilterResults = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Choices"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Choice.DeserializeChoice(item)); + } + choices = array; + continue; + } + if (property.NameEquals("Id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("Object"u8)) + { + @object = property.Value.GetString(); + continue; + } + if (property.NameEquals("Created"u8)) + { + created = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("Model"u8)) + { + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("Usage"u8)) + { + usage = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("PromptFilterResults"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(BinaryData.FromString(item.GetRawText())); + } + } + promptFilterResults = array; + continue; + } + } + return new CompletionResponse(id, @object, created, model, usage, promptFilterResults, choices); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CompletionResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCompletionResponse(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.cs new file mode 100644 index 000000000000..19f0388ffbc1 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CompletionResponse.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; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The CompletionResponse. + public partial class CompletionResponse : BaseCompletionResponse + { + /// Initializes a new instance of CompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + /// + /// , , , , or is null. + internal CompletionResponse(string id, string @object, DateTimeOffset created, string model, BinaryData usage, IEnumerable promptFilterResults, IEnumerable choices) : base(id, @object, created, model, usage, promptFilterResults) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(@object, nameof(@object)); + Argument.AssertNotNull(model, nameof(model)); + Argument.AssertNotNull(usage, nameof(usage)); + Argument.AssertNotNull(promptFilterResults, nameof(promptFilterResults)); + Argument.AssertNotNull(choices, nameof(choices)); + + Choices = choices.ToList(); + } + + /// Initializes a new instance of CompletionResponse. + /// The unique identifier for the response. + /// The object type. + /// The creation timestamp. + /// The model used for completion. + /// The usage statistics for the response. + /// The results of prompt filtering. + /// + internal CompletionResponse(string id, string @object, DateTimeOffset created, string model, BinaryData usage, IReadOnlyList promptFilterResults, IReadOnlyList choices) : base(id, @object, created, model, usage, promptFilterResults) + { + Choices = choices; + } + + /// Gets the choices. + public IReadOnlyList Choices { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.Serialization.cs new file mode 100644 index 000000000000..0536cf137f65 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class ComplianceFlags + { + internal static ComplianceFlags DeserializeComplianceFlags(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool recordLog = default; + bool customerOptedInToEyesOnProductImprovement = default; + bool customerOptedInToModelImprovement = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recordLog"u8)) + { + recordLog = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("customerOptedInToEyesOnProductImprovement"u8)) + { + customerOptedInToEyesOnProductImprovement = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("customerOptedInToModelImprovement"u8)) + { + customerOptedInToModelImprovement = property.Value.GetBoolean(); + continue; + } + } + return new ComplianceFlags(recordLog, customerOptedInToEyesOnProductImprovement, customerOptedInToModelImprovement); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ComplianceFlags FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeComplianceFlags(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.cs new file mode 100644 index 000000000000..209c0a785d43 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ComplianceFlags.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// ComplianceFlags. + public partial class ComplianceFlags + { + /// Initializes a new instance of ComplianceFlags. + /// Whether to record logs in Geneva and Kusto for this user. + /// Locked down tables not required and non-customer content table does not have to be redacted. + /// When this is true, the data may be used for model improvement. This flag does not affect redaction. + internal ComplianceFlags(bool recordLog, bool customerOptedInToEyesOnProductImprovement, bool customerOptedInToModelImprovement) + { + RecordLog = recordLog; + CustomerOptedInToEyesOnProductImprovement = customerOptedInToEyesOnProductImprovement; + CustomerOptedInToModelImprovement = customerOptedInToModelImprovement; + } + + /// Whether to record logs in Geneva and Kusto for this user. + public bool RecordLog { get; } + /// Locked down tables not required and non-customer content table does not have to be redacted. + public bool CustomerOptedInToEyesOnProductImprovement { get; } + /// When this is true, the data may be used for model improvement. This flag does not affect redaction. + public bool CustomerOptedInToModelImprovement { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.Serialization.cs new file mode 100644 index 000000000000..58cde763549e --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class CreateChatCompletionRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DeploymentId)) + { + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); + } + writer.WritePropertyName("chatCompletionRequest"u8); + writer.WriteObjectValue(ChatCompletionRequest); + if (Optional.IsDefined(OpenAiExecutionContext)) + { + writer.WritePropertyName("openAiExecutionContext"u8); + writer.WriteObjectValue(OpenAiExecutionContext); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.cs new file mode 100644 index 000000000000..11ffd1d35d36 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateChatCompletionRequest.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a request to create a chat completion. + public partial class CreateChatCompletionRequest + { + /// Initializes a new instance of CreateChatCompletionRequest. + /// The chat completion request details. + /// is null. + public CreateChatCompletionRequest(ChatCompletionRequest chatCompletionRequest) + { + Argument.AssertNotNull(chatCompletionRequest, nameof(chatCompletionRequest)); + + ChatCompletionRequest = chatCompletionRequest; + } + + /// Initializes a new instance of CreateChatCompletionRequest. + /// The deployment ID. + /// The chat completion request details. + /// The Azure OpenAI execution context. + internal CreateChatCompletionRequest(string deploymentId, ChatCompletionRequest chatCompletionRequest, AzureOpenAIExecutionContext openAiExecutionContext) + { + DeploymentId = deploymentId; + ChatCompletionRequest = chatCompletionRequest; + OpenAiExecutionContext = openAiExecutionContext; + } + + /// The deployment ID. + public string DeploymentId { get; set; } + /// The chat completion request details. + public ChatCompletionRequest ChatCompletionRequest { get; } + /// The Azure OpenAI execution context. + public AzureOpenAIExecutionContext OpenAiExecutionContext { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.Serialization.cs new file mode 100644 index 000000000000..72a2a13adca6 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class CreateCompletionRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DeploymentId)) + { + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); + } + writer.WritePropertyName("completionRequest"u8); + writer.WriteObjectValue(CompletionRequest); + if (Optional.IsDefined(OpenAiExecutionContext)) + { + writer.WritePropertyName("openAiExecutionContext"u8); + writer.WriteObjectValue(OpenAiExecutionContext); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.cs new file mode 100644 index 000000000000..abd6aa12588a --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateCompletionRequest.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a request to create a chat completion. + public partial class CreateCompletionRequest + { + /// Initializes a new instance of CreateCompletionRequest. + /// The chat completion request details. + /// is null. + public CreateCompletionRequest(CompletionRequest completionRequest) + { + Argument.AssertNotNull(completionRequest, nameof(completionRequest)); + + CompletionRequest = completionRequest; + } + + /// Initializes a new instance of CreateCompletionRequest. + /// The deployment ID. + /// The chat completion request details. + /// The Azure OpenAI execution context. + internal CreateCompletionRequest(string deploymentId, CompletionRequest completionRequest, AzureOpenAIExecutionContext openAiExecutionContext) + { + DeploymentId = deploymentId; + CompletionRequest = completionRequest; + OpenAiExecutionContext = openAiExecutionContext; + } + + /// The deployment ID. + public string DeploymentId { get; set; } + /// The chat completion request details. + public CompletionRequest CompletionRequest { get; } + /// The Azure OpenAI execution context. + public AzureOpenAIExecutionContext OpenAiExecutionContext { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.Serialization.cs new file mode 100644 index 000000000000..d7f2aa65ce6f --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class CreateEmbeddingRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DeploymentId)) + { + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); + } + writer.WritePropertyName("embeddingRequest"u8); + writer.WriteObjectValue(EmbeddingRequest); + if (Optional.IsDefined(OpenAiExecutionContext)) + { + writer.WritePropertyName("openAiExecutionContext"u8); + writer.WriteObjectValue(OpenAiExecutionContext); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.cs new file mode 100644 index 000000000000..3ed9beb39061 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/CreateEmbeddingRequest.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a request to create embedding. + public partial class CreateEmbeddingRequest + { + /// Initializes a new instance of CreateEmbeddingRequest. + /// The embedding request details. + /// is null. + public CreateEmbeddingRequest(EmbeddingRequest embeddingRequest) + { + Argument.AssertNotNull(embeddingRequest, nameof(embeddingRequest)); + + EmbeddingRequest = embeddingRequest; + } + + /// Initializes a new instance of CreateEmbeddingRequest. + /// The deployment ID. + /// The embedding request details. + /// The Azure OpenAI execution context. + internal CreateEmbeddingRequest(string deploymentId, EmbeddingRequest embeddingRequest, AzureOpenAIExecutionContext openAiExecutionContext) + { + DeploymentId = deploymentId; + EmbeddingRequest = embeddingRequest; + OpenAiExecutionContext = openAiExecutionContext; + } + + /// The deployment ID. + public string DeploymentId { get; set; } + /// The embedding request details. + public EmbeddingRequest EmbeddingRequest { get; } + /// The Azure OpenAI execution context. + public AzureOpenAIExecutionContext OpenAiExecutionContext { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.Serialization.cs new file mode 100644 index 000000000000..eb1b12b7dbdd --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class EmbeddingData + { + internal static EmbeddingData DeserializeEmbeddingData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList embedding = default; + int index = default; + string @object = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Embedding"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetSingle()); + } + embedding = array; + continue; + } + if (property.NameEquals("Index"u8)) + { + index = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("Object"u8)) + { + @object = property.Value.GetString(); + continue; + } + } + return new EmbeddingData(embedding, index, @object); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EmbeddingData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEmbeddingData(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.cs new file mode 100644 index 000000000000..e7e1e774486f --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The EmbeddingData. + public partial class EmbeddingData + { + /// Initializes a new instance of EmbeddingData. + /// + /// + /// + /// or is null. + internal EmbeddingData(IEnumerable embedding, int index, string @object) + { + Argument.AssertNotNull(embedding, nameof(embedding)); + Argument.AssertNotNull(@object, nameof(@object)); + + Embedding = embedding.ToList(); + Index = index; + Object = @object; + } + + /// Initializes a new instance of EmbeddingData. + /// + /// + /// + internal EmbeddingData(IReadOnlyList embedding, int index, string @object) + { + Embedding = embedding; + Index = index; + Object = @object; + } + + /// Gets the embedding. + public IReadOnlyList Embedding { get; } + /// Gets the index. + public int Index { get; } + /// Gets the object. + public string Object { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.Serialization.cs new file mode 100644 index 000000000000..58bd9e548852 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class EmbeddingRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Input"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Input); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Input.ToString()).RootElement); +#endif + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.cs new file mode 100644 index 000000000000..f6e45cdee760 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingRequest.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The EmbeddingRequest. + public partial class EmbeddingRequest + { + /// Initializes a new instance of EmbeddingRequest. + /// The object to embed. + /// is null. + public EmbeddingRequest(BinaryData input) + { + Argument.AssertNotNull(input, nameof(input)); + + Input = input; + } + + /// + /// The object to embed. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Input { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.Serialization.cs new file mode 100644 index 000000000000..b48f7154f747 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class EmbeddingResponse + { + internal static EmbeddingResponse DeserializeEmbeddingResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList data = default; + string model = default; + string @object = default; + BinaryData usage = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Data"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EmbeddingData.DeserializeEmbeddingData(item)); + } + data = array; + continue; + } + if (property.NameEquals("Model"u8)) + { + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("Object"u8)) + { + @object = property.Value.GetString(); + continue; + } + if (property.NameEquals("Usage"u8)) + { + usage = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + } + return new EmbeddingResponse(data, model, @object, usage); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EmbeddingResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEmbeddingResponse(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.cs new file mode 100644 index 000000000000..8a7d2116bddc --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EmbeddingResponse.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The EmbeddingResponse. + public partial class EmbeddingResponse + { + /// Initializes a new instance of EmbeddingResponse. + /// + /// + /// + /// + /// , , or is null. + internal EmbeddingResponse(IEnumerable data, string model, string @object, BinaryData usage) + { + Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(model, nameof(model)); + Argument.AssertNotNull(@object, nameof(@object)); + Argument.AssertNotNull(usage, nameof(usage)); + + Data = data.ToList(); + Model = model; + Object = @object; + Usage = usage; + } + + /// Initializes a new instance of EmbeddingResponse. + /// + /// + /// + /// + internal EmbeddingResponse(IReadOnlyList data, string model, string @object, BinaryData usage) + { + Data = data; + Model = model; + Object = @object; + Usage = usage; + } + + /// Gets the data. + public IReadOnlyList Data { get; } + /// Gets the model. + public string Model { get; } + /// Gets the object. + public string Object { get; } + /// + /// Gets the usage + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Usage { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationCategory.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationCategory.cs new file mode 100644 index 000000000000..be0e6c69167e --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationCategory.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Evaluation Invocation Category. + public readonly partial struct EvaluationInvocationCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EvaluationInvocationCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserPromptValue = "UserPrompt"; + private const string PromptbooksValue = "Promptbooks"; + + /// Generated from a Prompt. + public static EvaluationInvocationCategory UserPrompt { get; } = new EvaluationInvocationCategory(UserPromptValue); + /// Generated from a Promptbook. + public static EvaluationInvocationCategory Promptbooks { get; } = new EvaluationInvocationCategory(PromptbooksValue); + /// Determines if two values are the same. + public static bool operator ==(EvaluationInvocationCategory left, EvaluationInvocationCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EvaluationInvocationCategory left, EvaluationInvocationCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EvaluationInvocationCategory(string value) => new EvaluationInvocationCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EvaluationInvocationCategory other && Equals(other); + /// + public bool Equals(EvaluationInvocationCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationType.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationType.cs new file mode 100644 index 000000000000..4d1ea7e91f31 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationInvocationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Evaluation Invocation Type. + public readonly partial struct EvaluationInvocationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EvaluationInvocationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManualValue = "Manual"; + private const string AutomatedValue = "Automated"; + + /// Manual generation. + public static EvaluationInvocationType Manual { get; } = new EvaluationInvocationType(ManualValue); + /// Automated generation. + public static EvaluationInvocationType Automated { get; } = new EvaluationInvocationType(AutomatedValue); + /// Determines if two values are the same. + public static bool operator ==(EvaluationInvocationType left, EvaluationInvocationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EvaluationInvocationType left, EvaluationInvocationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EvaluationInvocationType(string value) => new EvaluationInvocationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EvaluationInvocationType other && Equals(other); + /// + public bool Equals(EvaluationInvocationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.Serialization.cs new file mode 100644 index 000000000000..21e3a7f31750 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class EvaluationResultOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("skillOutputType"u8); + writer.WriteStringValue(SkillOutputType.ToString()); + if (Optional.IsDefined(PrimitiveOutput)) + { + writer.WritePropertyName("primitiveOutput"u8); + writer.WriteObjectValue(PrimitiveOutput); + } + if (Optional.IsDefined(StructuredOutput)) + { + writer.WritePropertyName("structuredOutput"u8); + writer.WriteObjectValue(StructuredOutput); + } + if (Optional.IsDefined(PrimitiveOutputValue)) + { + writer.WritePropertyName("primitiveOutputValue"u8); + writer.WriteStringValue(PrimitiveOutputValue); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.cs new file mode 100644 index 000000000000..dad0eb29ee2b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/EvaluationResultOutput.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The EvaluationResultOutput. + public partial class EvaluationResultOutput + { + /// Initializes a new instance of EvaluationResultOutput. + /// + public EvaluationResultOutput(SkillOutputType skillOutputType) + { + SkillOutputType = skillOutputType; + } + + /// Initializes a new instance of EvaluationResultOutput. + /// + /// + /// + /// + internal EvaluationResultOutput(SkillOutputType skillOutputType, OutputSkillVariable primitiveOutput, SkillStructuredOutput structuredOutput, string primitiveOutputValue) + { + SkillOutputType = skillOutputType; + PrimitiveOutput = primitiveOutput; + StructuredOutput = structuredOutput; + PrimitiveOutputValue = primitiveOutputValue; + } + + /// Gets the skill output type. + public SkillOutputType SkillOutputType { get; } + /// Gets or sets the primitive output. + public OutputSkillVariable PrimitiveOutput { get; set; } + /// Gets or sets the structured output. + public SkillStructuredOutput StructuredOutput { get; set; } + /// Gets or sets the primitive output value. + public string PrimitiveOutputValue { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.Serialization.cs new file mode 100644 index 000000000000..3e44393853f8 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class FunctionCall : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Name"u8); + writer.WriteStringValue(Name); + if (Optional.IsCollectionDefined(Arguments)) + { + writer.WritePropertyName("Arguments"u8); + writer.WriteStartObject(); + foreach (var item in Arguments) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static FunctionCall DeserializeFunctionCall(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + Optional> arguments = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("Arguments"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + arguments = dictionary; + continue; + } + } + return new FunctionCall(name, Optional.ToDictionary(arguments)); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static FunctionCall FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeFunctionCall(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.cs new file mode 100644 index 000000000000..ac2308c1b499 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionCall.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a function call. + public partial class FunctionCall + { + /// Initializes a new instance of FunctionCall. + /// The name of the function. + /// is null. + public FunctionCall(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + Arguments = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of FunctionCall. + /// The name of the function. + /// The arguments passed to the function. + internal FunctionCall(string name, IDictionary arguments) + { + Name = name; + Arguments = arguments; + } + + /// The name of the function. + public string Name { get; set; } + /// The arguments passed to the function. + public IDictionary Arguments { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.Serialization.cs new file mode 100644 index 000000000000..a1c654ccfdcb --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class FunctionDefinition : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("Name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("Parameters"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Parameters); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Parameters.ToString()).RootElement); +#endif + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.cs new file mode 100644 index 000000000000..e661cc806aa4 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionDefinition.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents the definition of a function. + public partial class FunctionDefinition + { + /// Initializes a new instance of FunctionDefinition. + /// The description of the function. + /// The name of the function. + /// The parameters for the function. + /// , or is null. + public FunctionDefinition(string description, string name, BinaryData parameters) + { + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(parameters, nameof(parameters)); + + Description = description; + Name = name; + Parameters = parameters; + } + + /// The description of the function. + public string Description { get; } + /// The name of the function. + public string Name { get; } + /// + /// The parameters for the function. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Parameters { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.Serialization.cs new file mode 100644 index 000000000000..762f54c7b5b6 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class FunctionParameter : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("Properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("Required"u8); + writer.WriteStartArray(); + foreach (var item in Required) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.cs new file mode 100644 index 000000000000..ac337f06febd --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameter.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents parameters for a function. + public partial class FunctionParameter + { + /// Initializes a new instance of FunctionParameter. + /// The type of the parameter. + /// The properties of the parameter. + /// The list of required properties. + /// , or is null. + public FunctionParameter(string type, IDictionary properties, IEnumerable required) + { + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(required, nameof(required)); + + Type = type; + Properties = properties; + Required = required.ToList(); + } + + /// Initializes a new instance of FunctionParameter. + /// The type of the parameter. + /// The properties of the parameter. + /// The list of required properties. + internal FunctionParameter(string type, IDictionary properties, IList required) + { + Type = type; + Properties = properties; + Required = required; + } + + /// The type of the parameter. + public string Type { get; } + /// The properties of the parameter. + public IDictionary Properties { get; } + /// The list of required properties. + public IList Required { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.Serialization.cs new file mode 100644 index 000000000000..b25de89f42e3 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class FunctionParameterProperty : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("Description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("Enum"u8); + writer.WriteStartArray(); + foreach (var item in Enum) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.cs new file mode 100644 index 000000000000..5a107c8f2c83 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionParameterProperty.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents parameters properties for a function. + public partial class FunctionParameterProperty + { + /// Initializes a new instance of FunctionParameterProperty. + /// The type of the parameter property. + /// The description of property of the parameter. + /// The list of enums. + /// , or is null. + public FunctionParameterProperty(string type, string description, IEnumerable @enum) + { + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(@enum, nameof(@enum)); + + Type = type; + Description = description; + Enum = @enum.ToList(); + } + + /// Initializes a new instance of FunctionParameterProperty. + /// The type of the parameter property. + /// The description of property of the parameter. + /// The list of enums. + internal FunctionParameterProperty(string type, string description, IList @enum) + { + Type = type; + Description = description; + Enum = @enum; + } + + /// The type of the parameter property. + public string Type { get; } + /// The description of property of the parameter. + public string Description { get; } + /// The list of enums. + public IList Enum { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.Serialization.cs new file mode 100644 index 000000000000..c31059ce5dcc --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class FunctionResult : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Type"u8); + writer.WriteStringValue(Type); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.cs new file mode 100644 index 000000000000..1714a3e5efa2 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/FunctionResult.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents the result of a function. + public partial class FunctionResult + { + /// Initializes a new instance of FunctionResult. + /// The type of the result. + /// is null. + public FunctionResult(string type) + { + Argument.AssertNotNull(type, nameof(type)); + + Type = type; + } + + /// The type of the result. + public string Type { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.Serialization.cs new file mode 100644 index 000000000000..e4198c588b8c --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class GPTFunction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("Description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("Parameters"u8); + writer.WriteObjectValue(Parameters); + writer.WritePropertyName("Result"u8); + writer.WriteObjectValue(Result); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.cs new file mode 100644 index 000000000000..9215851ec46b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GPTFunction.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a GPT function definition. + public partial class GPTFunction + { + /// Initializes a new instance of GPTFunction. + /// The name of the GPT function. + /// The description of the GPT function. + /// The parameters required by the GPT function. + /// The result of the GPT function. + /// , , or is null. + public GPTFunction(string name, string description, FunctionParameter parameters, FunctionResult result) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(parameters, nameof(parameters)); + Argument.AssertNotNull(result, nameof(result)); + + Name = name; + Description = description; + Parameters = parameters; + Result = result; + } + + /// The name of the GPT function. + public string Name { get; } + /// The description of the GPT function. + public string Description { get; } + /// The parameters required by the GPT function. + public FunctionParameter Parameters { get; } + /// The result of the GPT function. + public FunctionResult Result { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.Serialization.cs new file mode 100644 index 000000000000..b5bd69e7e78f --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class GetInputRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("inputName"u8); + writer.WriteStringValue(InputName); + if (Optional.IsDefined(DefaultValue)) + { + if (DefaultValue != null) + { + writer.WritePropertyName("defaultValue"u8); + writer.WriteObjectValue(DefaultValue); + } + else + { + writer.WriteNull("defaultValue"); + } + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.cs new file mode 100644 index 000000000000..cf99bb06ba09 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetInputRequest.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// GetInputRequest. + public partial class GetInputRequest + { + /// Initializes a new instance of GetInputRequest. + /// Input Name. + /// is null. + public GetInputRequest(string inputName) + { + Argument.AssertNotNull(inputName, nameof(inputName)); + + InputName = inputName; + } + + /// Initializes a new instance of GetInputRequest. + /// Input Name. + /// Default value for the input. + internal GetInputRequest(string inputName, SkillVariable defaultValue) + { + InputName = inputName; + DefaultValue = defaultValue; + } + + /// Input Name. + public string InputName { get; } + /// Default value for the input. + public SkillVariable DefaultValue { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.Serialization.cs new file mode 100644 index 000000000000..f9b0084a34d4 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class GetTokenCredentialRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("scopes"u8); + writer.WriteStartArray(); + foreach (var item in Scopes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("tokenCredentialType"u8); + writer.WriteStringValue(TokenCredentialType.ToString()); + if (Optional.IsDefined(TenantId)) + { + if (TenantId != null) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + } + else + { + writer.WriteNull("tenantId"); + } + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.cs new file mode 100644 index 000000000000..a77e10c58b40 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/GetTokenCredentialRequest.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// TokenCredentialRequest. + public partial class GetTokenCredentialRequest + { + /// Initializes a new instance of GetTokenCredentialRequest. + /// Scopes. + /// TokenCredential Type. + /// is null. + public GetTokenCredentialRequest(IEnumerable scopes, TokenCredentialEnum tokenCredentialType) + { + Argument.AssertNotNull(scopes, nameof(scopes)); + + Scopes = scopes.ToList(); + TokenCredentialType = tokenCredentialType; + } + + /// Initializes a new instance of GetTokenCredentialRequest. + /// Scopes. + /// TokenCredential Type. + /// TenantId. + internal GetTokenCredentialRequest(IList scopes, TokenCredentialEnum tokenCredentialType, string tenantId) + { + Scopes = scopes; + TokenCredentialType = tokenCredentialType; + TenantId = tenantId; + } + + /// Scopes. + public IList Scopes { get; } + /// TokenCredential Type. + public TokenCredentialEnum TokenCredentialType { get; } + /// TenantId. + public string TenantId { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.Serialization.cs new file mode 100644 index 000000000000..961c38aee8f7 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class InvokeSkillRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SkillsetName)) + { + writer.WritePropertyName("skillsetName"u8); + writer.WriteStringValue(SkillsetName); + } + writer.WritePropertyName("skillName"u8); + writer.WriteStringValue(SkillName); + if (Inputs != null && Optional.IsCollectionDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("inputs"); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.cs new file mode 100644 index 000000000000..bf31f0df9056 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/InvokeSkillRequest.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Invoke skill request including necessary inputs for invoking a skill. + public partial class InvokeSkillRequest + { + /// Initializes a new instance of InvokeSkillRequest. + /// Name of skill to be invoked. + /// Skill inputs. + /// is null. + public InvokeSkillRequest(string skillName, IDictionary inputs) + { + Argument.AssertNotNull(skillName, nameof(skillName)); + + SkillName = skillName; + Inputs = inputs; + } + + /// Initializes a new instance of InvokeSkillRequest. + /// Name of skillset in which desired skill to invoke resides. + /// Name of skill to be invoked. + /// Skill inputs. + internal InvokeSkillRequest(string skillsetName, string skillName, IDictionary inputs) + { + SkillsetName = skillsetName; + SkillName = skillName; + Inputs = inputs; + } + + /// Name of skillset in which desired skill to invoke resides. + public string SkillsetName { get; set; } + /// Name of skill to be invoked. + public string SkillName { get; } + /// Skill inputs. + public IDictionary Inputs { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.Serialization.cs new file mode 100644 index 000000000000..bd8762cd0b9c --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class LogProgressRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Level)) + { + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level.Value.ToString()); + } + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.cs new file mode 100644 index 000000000000..b0fd3c9159c6 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/LogProgressRequest.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The progress message to log during a skill invocation. + public partial class LogProgressRequest + { + /// Initializes a new instance of LogProgressRequest. + /// Log message. + /// is null. + public LogProgressRequest(string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Message = message; + } + + /// Initializes a new instance of LogProgressRequest. + /// Log level. + /// Log message. + internal LogProgressRequest(ProgressLogLevel? level, string message) + { + Level = level; + Message = message; + } + + /// Log level. + public ProgressLogLevel? Level { get; set; } + /// Log message. + public string Message { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.Serialization.cs new file mode 100644 index 000000000000..7f3a1a4b0913 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class MedeinaExecutionContext + { + internal static MedeinaExecutionContext DeserializeMedeinaExecutionContext(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sessionId = default; + string promptId = default; + string evaluationId = default; + string tenantId = default; + string accountId = default; + string workspaceId = default; + string userName = default; + Optional applicationId = default; + string source = default; + string unauthenticatedSourceApplicationId = default; + string selectedSkills = default; + IReadOnlyList selectedSkillsets = default; + bool isFidelisUser = default; + EvaluationInvocationType invocationType = default; + EvaluationInvocationCategory invocationCategory = default; + string encryptedUserAccessToken = default; + ComplianceFlags complianceFlags = default; + AzureOpenAIExecutionContext azureOpenAIExecutionContext = default; + SkillPreviewState previewState = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("SessionId"u8)) + { + sessionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("PromptId"u8)) + { + promptId = property.Value.GetString(); + continue; + } + if (property.NameEquals("EvaluationId"u8)) + { + evaluationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("TenantId"u8)) + { + tenantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("AccountId"u8)) + { + accountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("WorkspaceId"u8)) + { + workspaceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("UserName"u8)) + { + userName = property.Value.GetString(); + continue; + } + if (property.NameEquals("ApplicationId"u8)) + { + applicationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("Source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("UnauthenticatedSourceApplicationId"u8)) + { + unauthenticatedSourceApplicationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("SelectedSkills"u8)) + { + selectedSkills = property.Value.GetString(); + continue; + } + if (property.NameEquals("SelectedSkillsets"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + selectedSkillsets = array; + continue; + } + if (property.NameEquals("IsFidelisUser"u8)) + { + isFidelisUser = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("InvocationType"u8)) + { + invocationType = new EvaluationInvocationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("InvocationCategory"u8)) + { + invocationCategory = new EvaluationInvocationCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("EncryptedUserAccessToken"u8)) + { + encryptedUserAccessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("ComplianceFlags"u8)) + { + complianceFlags = ComplianceFlags.DeserializeComplianceFlags(property.Value); + continue; + } + if (property.NameEquals("AzureOpenAIExecutionContext"u8)) + { + azureOpenAIExecutionContext = AzureOpenAIExecutionContext.DeserializeAzureOpenAIExecutionContext(property.Value); + continue; + } + if (property.NameEquals("PreviewState"u8)) + { + previewState = new SkillPreviewState(property.Value.GetString()); + continue; + } + } + return new MedeinaExecutionContext(sessionId, promptId, evaluationId, tenantId, accountId, workspaceId, userName, applicationId.Value, source, unauthenticatedSourceApplicationId, selectedSkills, selectedSkillsets, isFidelisUser, invocationType, invocationCategory, encryptedUserAccessToken, complianceFlags, azureOpenAIExecutionContext, previewState); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static MedeinaExecutionContext FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMedeinaExecutionContext(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.cs new file mode 100644 index 000000000000..016e748f8b6d --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/MedeinaExecutionContext.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents the execution context for the current session. + public partial class MedeinaExecutionContext + { + /// Initializes a new instance of MedeinaExecutionContext. + /// The session id. + /// The prompt id. + /// The evaluation id. + /// The tenant id. + /// The account id. + /// The workspace id. + /// The display name of the user. + /// The Source tag i.e. 'immersive'. + /// The source application ID. + /// The selected skills. + /// The skillsets identified for execution during the evaluation process post skill selection. + /// Indicates whether the context is for a user onboarded to Fidelis. + /// Indicates whether the evaluation is manually generated or user driven. + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + /// The encrypted token used to authenticate the user. + /// Compliance flags for logging. + /// Contains the context for the Azure OpenAI requests such as the deployment id. + /// Preview state of the execution context. + /// , , , , , , , , , , , , or is null. + internal MedeinaExecutionContext(string sessionId, string promptId, string evaluationId, string tenantId, string accountId, string workspaceId, string userName, string source, string unauthenticatedSourceApplicationId, string selectedSkills, IEnumerable selectedSkillsets, bool isFidelisUser, EvaluationInvocationType invocationType, EvaluationInvocationCategory invocationCategory, string encryptedUserAccessToken, ComplianceFlags complianceFlags, AzureOpenAIExecutionContext azureOpenAIExecutionContext, SkillPreviewState previewState) + { + Argument.AssertNotNull(sessionId, nameof(sessionId)); + Argument.AssertNotNull(promptId, nameof(promptId)); + Argument.AssertNotNull(evaluationId, nameof(evaluationId)); + Argument.AssertNotNull(tenantId, nameof(tenantId)); + Argument.AssertNotNull(accountId, nameof(accountId)); + Argument.AssertNotNull(workspaceId, nameof(workspaceId)); + Argument.AssertNotNull(userName, nameof(userName)); + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(unauthenticatedSourceApplicationId, nameof(unauthenticatedSourceApplicationId)); + Argument.AssertNotNull(selectedSkills, nameof(selectedSkills)); + Argument.AssertNotNull(selectedSkillsets, nameof(selectedSkillsets)); + Argument.AssertNotNull(encryptedUserAccessToken, nameof(encryptedUserAccessToken)); + Argument.AssertNotNull(complianceFlags, nameof(complianceFlags)); + Argument.AssertNotNull(azureOpenAIExecutionContext, nameof(azureOpenAIExecutionContext)); + + SessionId = sessionId; + PromptId = promptId; + EvaluationId = evaluationId; + TenantId = tenantId; + AccountId = accountId; + WorkspaceId = workspaceId; + UserName = userName; + Source = source; + UnauthenticatedSourceApplicationId = unauthenticatedSourceApplicationId; + SelectedSkills = selectedSkills; + SelectedSkillsets = selectedSkillsets.ToList(); + IsFidelisUser = isFidelisUser; + InvocationType = invocationType; + InvocationCategory = invocationCategory; + EncryptedUserAccessToken = encryptedUserAccessToken; + ComplianceFlags = complianceFlags; + AzureOpenAIExecutionContext = azureOpenAIExecutionContext; + PreviewState = previewState; + } + + /// Initializes a new instance of MedeinaExecutionContext. + /// The session id. + /// The prompt id. + /// The evaluation id. + /// The tenant id. + /// The account id. + /// The workspace id. + /// The display name of the user. + /// The Application Id that created the Session. + /// The Source tag i.e. 'immersive'. + /// The source application ID. + /// The selected skills. + /// The skillsets identified for execution during the evaluation process post skill selection. + /// Indicates whether the context is for a user onboarded to Fidelis. + /// Indicates whether the evaluation is manually generated or user driven. + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + /// The encrypted token used to authenticate the user. + /// Compliance flags for logging. + /// Contains the context for the Azure OpenAI requests such as the deployment id. + /// Preview state of the execution context. + internal MedeinaExecutionContext(string sessionId, string promptId, string evaluationId, string tenantId, string accountId, string workspaceId, string userName, string applicationId, string source, string unauthenticatedSourceApplicationId, string selectedSkills, IReadOnlyList selectedSkillsets, bool isFidelisUser, EvaluationInvocationType invocationType, EvaluationInvocationCategory invocationCategory, string encryptedUserAccessToken, ComplianceFlags complianceFlags, AzureOpenAIExecutionContext azureOpenAIExecutionContext, SkillPreviewState previewState) + { + SessionId = sessionId; + PromptId = promptId; + EvaluationId = evaluationId; + TenantId = tenantId; + AccountId = accountId; + WorkspaceId = workspaceId; + UserName = userName; + ApplicationId = applicationId; + Source = source; + UnauthenticatedSourceApplicationId = unauthenticatedSourceApplicationId; + SelectedSkills = selectedSkills; + SelectedSkillsets = selectedSkillsets; + IsFidelisUser = isFidelisUser; + InvocationType = invocationType; + InvocationCategory = invocationCategory; + EncryptedUserAccessToken = encryptedUserAccessToken; + ComplianceFlags = complianceFlags; + AzureOpenAIExecutionContext = azureOpenAIExecutionContext; + PreviewState = previewState; + } + + /// The session id. + public string SessionId { get; } + /// The prompt id. + public string PromptId { get; } + /// The evaluation id. + public string EvaluationId { get; } + /// The tenant id. + public string TenantId { get; } + /// The account id. + public string AccountId { get; } + /// The workspace id. + public string WorkspaceId { get; } + /// The display name of the user. + public string UserName { get; } + /// The Application Id that created the Session. + public string ApplicationId { get; } + /// The Source tag i.e. 'immersive'. + public string Source { get; } + /// The source application ID. + public string UnauthenticatedSourceApplicationId { get; } + /// The selected skills. + public string SelectedSkills { get; } + /// The skillsets identified for execution during the evaluation process post skill selection. + public IReadOnlyList SelectedSkillsets { get; } + /// Indicates whether the context is for a user onboarded to Fidelis. + public bool IsFidelisUser { get; } + /// Indicates whether the evaluation is manually generated or user driven. + public EvaluationInvocationType InvocationType { get; } + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + public EvaluationInvocationCategory InvocationCategory { get; } + /// The encrypted token used to authenticate the user. + public string EncryptedUserAccessToken { get; } + /// Compliance flags for logging. + public ComplianceFlags ComplianceFlags { get; } + /// Contains the context for the Azure OpenAI requests such as the deployment id. + public AzureOpenAIExecutionContext AzureOpenAIExecutionContext { get; } + /// Preview state of the execution context. + public SkillPreviewState PreviewState { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.Serialization.cs new file mode 100644 index 000000000000..9c518031b85f --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class Message : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Content)) + { + writer.WritePropertyName("Content"u8); + writer.WriteStringValue(Content); + } + writer.WritePropertyName("Role"u8); + writer.WriteStringValue(Role); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("Name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(FunctionCall)) + { + writer.WritePropertyName("FunctionCall"u8); + writer.WriteObjectValue(FunctionCall); + } + if (Optional.IsCollectionDefined(ToolCalls)) + { + writer.WritePropertyName("ToolCalls"u8); + writer.WriteStartArray(); + foreach (var item in ToolCalls) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ToolCallId)) + { + writer.WritePropertyName("ToolCallId"u8); + writer.WriteStringValue(ToolCallId); + } + writer.WriteEndObject(); + } + + internal static Message DeserializeMessage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional content = default; + string role = default; + Optional name = default; + Optional functionCall = default; + Optional> toolCalls = default; + Optional toolCallId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Content"u8)) + { + content = property.Value.GetString(); + continue; + } + if (property.NameEquals("Role"u8)) + { + role = property.Value.GetString(); + continue; + } + if (property.NameEquals("Name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("FunctionCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + functionCall = FunctionCall.DeserializeFunctionCall(property.Value); + continue; + } + if (property.NameEquals("ToolCalls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ToolCall.DeserializeToolCall(item)); + } + toolCalls = array; + continue; + } + if (property.NameEquals("ToolCallId"u8)) + { + toolCallId = property.Value.GetString(); + continue; + } + } + return new Message(content.Value, role, name.Value, functionCall.Value, Optional.ToList(toolCalls), toolCallId.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static Message FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeMessage(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.cs new file mode 100644 index 000000000000..1c175ecbddb5 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Message.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a message in the chat. + public partial class Message + { + /// Initializes a new instance of Message. + /// The role of the message sender. + /// is null. + public Message(string role) + { + Argument.AssertNotNull(role, nameof(role)); + + Role = role; + ToolCalls = new ChangeTrackingList(); + } + + /// Initializes a new instance of Message. + /// The content of the message. + /// The role of the message sender. + /// The name of the message sender. + /// The function call information. + /// The tool calls associated with the message. + /// The identifier for the tool call. + internal Message(string content, string role, string name, FunctionCall functionCall, IList toolCalls, string toolCallId) + { + Content = content; + Role = role; + Name = name; + FunctionCall = functionCall; + ToolCalls = toolCalls; + ToolCallId = toolCallId; + } + + /// The content of the message. + public string Content { get; set; } + /// The role of the message sender. + public string Role { get; set; } + /// The name of the message sender. + public string Name { get; set; } + /// The function call information. + public FunctionCall FunctionCall { get; set; } + /// The tool calls associated with the message. + public IList ToolCalls { get; } + /// The identifier for the tool call. + public string ToolCallId { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputComponent.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputComponent.cs new file mode 100644 index 000000000000..f007ecb7980a --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputComponent.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The OutputComponent. + public partial class OutputComponent + { + /// Initializes a new instance of OutputComponent. + /// + /// + /// + /// , or is null. + internal OutputComponent(string name, string content, string type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(type, nameof(type)); + + Name = name; + Content = content; + Type = type; + } + + /// Initializes a new instance of OutputComponent. + /// + /// + /// + /// + internal OutputComponent(string name, string content, string description, string type) + { + Name = name; + Content = content; + Description = description; + Type = type; + } + + /// Gets the name. + public string Name { get; } + /// Gets the content. + public string Content { get; } + /// Gets the description. + public string Description { get; } + /// Gets the type. + public string Type { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.Serialization.cs new file mode 100644 index 000000000000..adf8a8c886da --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.Serialization.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class OutputSkillVariable : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Sources != null && Optional.IsCollectionDefined(Sources)) + { + writer.WritePropertyName("sources"u8); + writer.WriteStartArray(); + foreach (var item in Sources) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("sources"); + } + if (SuggestedPrompts != null && Optional.IsCollectionDefined(SuggestedPrompts)) + { + writer.WritePropertyName("suggestedPrompts"u8); + writer.WriteStartArray(); + foreach (var item in SuggestedPrompts) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("suggestedPrompts"); + } + if (SkillName != null) + { + writer.WritePropertyName("skillName"u8); + writer.WriteStringValue(SkillName); + } + else + { + writer.WriteNull("skillName"); + } + if (SkillInputs != null && Optional.IsCollectionDefined(SkillInputs)) + { + writer.WritePropertyName("skillInputs"u8); + writer.WriteStartObject(); + foreach (var item in SkillInputs) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("skillInputs"); + } + if (OutputLanguage != null) + { + writer.WritePropertyName("outputLanguage"u8); + writer.WriteStringValue(OutputLanguage); + } + else + { + writer.WriteNull("outputLanguage"); + } + writer.WritePropertyName("outputType"u8); + writer.WriteStringValue(OutputType.ToString()); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + writer.WritePropertyName("valueStoredAsJson"u8); + writer.WriteBooleanValue(ValueStoredAsJson); + writer.WriteEndObject(); + } + + internal static OutputSkillVariable DeserializeOutputSkillVariable(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sources = default; + IList suggestedPrompts = default; + string skillName = default; + IDictionary skillInputs = default; + string outputLanguage = default; + SkillOutputType outputType = default; + Optional type = default; + Optional value = default; + bool valueStoredAsJson = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sources = new ChangeTrackingList(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SkillSource.DeserializeSkillSource(item)); + } + sources = array; + continue; + } + if (property.NameEquals("suggestedPrompts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + suggestedPrompts = new ChangeTrackingList(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SuggestedPrompt.DeserializeSuggestedPrompt(item)); + } + suggestedPrompts = array; + continue; + } + if (property.NameEquals("skillName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + skillName = null; + continue; + } + skillName = property.Value.GetString(); + continue; + } + if (property.NameEquals("skillInputs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + skillInputs = new ChangeTrackingDictionary(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + skillInputs = dictionary; + continue; + } + if (property.NameEquals("outputLanguage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outputLanguage = null; + continue; + } + outputLanguage = property.Value.GetString(); + continue; + } + if (property.NameEquals("outputType"u8)) + { + outputType = new SkillOutputType(property.Value.GetString()); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueStoredAsJson"u8)) + { + valueStoredAsJson = property.Value.GetBoolean(); + continue; + } + } + return new OutputSkillVariable(type.Value, value.Value, valueStoredAsJson, sources, suggestedPrompts, skillName, skillInputs, outputLanguage, outputType); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new OutputSkillVariable FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeOutputSkillVariable(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.cs new file mode 100644 index 000000000000..5da77c1b78de --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/OutputSkillVariable.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Skill variable parent entity adding additional attribute 'skillsource' to provide visibility to users as to what data/information was used in generating the output of a skill. + public partial class OutputSkillVariable : SkillVariable + { + /// Initializes a new instance of OutputSkillVariable. + /// Skill variable value is stored as json document. + /// Array of cited sources that were fetched by a skill and that impacted the output of the skill evaluation. + /// Suggested prompts providing assistance to users in understanding what prompts work well with CFS. + /// Skill name. + /// Skill inputs that were used in generating the output of the skill evaluation. + /// Skill output language. + /// Enum indicating the output type of the skill. Supports StructuredOutput and Primitive. + public OutputSkillVariable(bool valueStoredAsJson, IEnumerable sources, IEnumerable suggestedPrompts, string skillName, IDictionary skillInputs, string outputLanguage, SkillOutputType outputType) : base(valueStoredAsJson) + { + Sources = sources?.ToList(); + SuggestedPrompts = suggestedPrompts?.ToList(); + SkillName = skillName; + SkillInputs = skillInputs; + OutputLanguage = outputLanguage; + OutputType = outputType; + } + + /// Initializes a new instance of OutputSkillVariable. + /// Skill variable type. + /// Skill variable value. + /// Skill variable value is stored as json document. + /// Array of cited sources that were fetched by a skill and that impacted the output of the skill evaluation. + /// Suggested prompts providing assistance to users in understanding what prompts work well with CFS. + /// Skill name. + /// Skill inputs that were used in generating the output of the skill evaluation. + /// Skill output language. + /// Enum indicating the output type of the skill. Supports StructuredOutput and Primitive. + internal OutputSkillVariable(string type, string value, bool valueStoredAsJson, IList sources, IList suggestedPrompts, string skillName, IDictionary skillInputs, string outputLanguage, SkillOutputType outputType) : base(type, value, valueStoredAsJson) + { + Sources = sources; + SuggestedPrompts = suggestedPrompts; + SkillName = skillName; + SkillInputs = skillInputs; + OutputLanguage = outputLanguage; + OutputType = outputType; + } + + /// Array of cited sources that were fetched by a skill and that impacted the output of the skill evaluation. + public IList Sources { get; set; } + /// Suggested prompts providing assistance to users in understanding what prompts work well with CFS. + public IList SuggestedPrompts { get; set; } + /// Skill name. + public string SkillName { get; set; } + /// Skill inputs that were used in generating the output of the skill evaluation. + public IDictionary SkillInputs { get; set; } + /// Skill output language. + public string OutputLanguage { get; set; } + /// Enum indicating the output type of the skill. Supports StructuredOutput and Primitive. + public SkillOutputType OutputType { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ProgressLogLevel.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ProgressLogLevel.cs new file mode 100644 index 000000000000..c2288319f9e7 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ProgressLogLevel.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Level for progress logs. + public readonly partial struct ProgressLogLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProgressLogLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ErrorValue = "Error"; + private const string WarningValue = "Warning"; + private const string InformationValue = "Information"; + private const string VerboseValue = "Verbose"; + + /// Error log. + public static ProgressLogLevel Error { get; } = new ProgressLogLevel(ErrorValue); + /// Warning log. + public static ProgressLogLevel Warning { get; } = new ProgressLogLevel(WarningValue); + /// Information log. + public static ProgressLogLevel Information { get; } = new ProgressLogLevel(InformationValue); + /// Verbose log. + public static ProgressLogLevel Verbose { get; } = new ProgressLogLevel(VerboseValue); + /// Determines if two values are the same. + public static bool operator ==(ProgressLogLevel left, ProgressLogLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProgressLogLevel left, ProgressLogLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProgressLogLevel(string value) => new ProgressLogLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProgressLogLevel other && Equals(other); + /// + public bool Equals(ProgressLogLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.Serialization.cs new file mode 100644 index 000000000000..6868dd20714b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class PromptHistoryResponse + { + internal static PromptHistoryResponse DeserializePromptHistoryResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList prompts = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("prompts"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SessionPrompt.DeserializeSessionPrompt(item)); + } + prompts = array; + continue; + } + } + return new PromptHistoryResponse(prompts); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static PromptHistoryResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializePromptHistoryResponse(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.cs new file mode 100644 index 000000000000..748f1724a2e8 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/PromptHistoryResponse.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The prompt history of the current session. + public partial class PromptHistoryResponse + { + /// Initializes a new instance of PromptHistoryResponse. + /// List of prompts that have been evaluated in the current session. + /// is null. + internal PromptHistoryResponse(IEnumerable prompts) + { + Argument.AssertNotNull(prompts, nameof(prompts)); + + Prompts = prompts.ToList(); + } + + /// Initializes a new instance of PromptHistoryResponse. + /// List of prompts that have been evaluated in the current session. + internal PromptHistoryResponse(IReadOnlyList prompts) + { + Prompts = prompts; + } + + /// List of prompts that have been evaluated in the current session. + public IReadOnlyList Prompts { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.Serialization.cs new file mode 100644 index 000000000000..46af7534dd62 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SessionPrompt + { + internal static SessionPrompt DeserializeSessionPrompt(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string prompt = default; + string response = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("prompt"u8)) + { + prompt = property.Value.GetString(); + continue; + } + if (property.NameEquals("response"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + response = null; + continue; + } + response = property.Value.GetString(); + continue; + } + } + return new SessionPrompt(prompt, response); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SessionPrompt FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSessionPrompt(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.cs new file mode 100644 index 000000000000..d4835dd0d072 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SessionPrompt.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// A record for a prompt and response used in tracking session prompt history. + public partial class SessionPrompt + { + /// Initializes a new instance of SessionPrompt. + /// The content of the prompt. + /// Prompt response returned by the prompt evaluation. + /// is null. + internal SessionPrompt(string prompt, string response) + { + Argument.AssertNotNull(prompt, nameof(prompt)); + + Prompt = prompt; + Response = response; + } + + /// The content of the prompt. + public string Prompt { get; } + /// Prompt response returned by the prompt evaluation. + public string Response { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.Serialization.cs new file mode 100644 index 000000000000..87d7d7f3c856 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SetFinalResponseSettingsRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("finalResponseBehavior"u8); + writer.WriteStringValue(FinalResponseBehavior); + if (Optional.IsDefined(FinalResponseFormat)) + { + writer.WritePropertyName("finalResponseFormat"u8); + writer.WriteStringValue(FinalResponseFormat); + } + if (Optional.IsDefined(FinalResponsePersona)) + { + writer.WritePropertyName("finalResponsePersona"u8); + writer.WriteStringValue(FinalResponsePersona); + } + if (Optional.IsDefined(FinalResponseFallback)) + { + writer.WritePropertyName("finalResponseFallback"u8); + writer.WriteStringValue(FinalResponseFallback); + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.cs new file mode 100644 index 000000000000..14f88e96e3a3 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetFinalResponseSettingsRequest.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// SetFinalResponseSettingsRequest. + public partial class SetFinalResponseSettingsRequest + { + /// Initializes a new instance of SetFinalResponseSettingsRequest. + /// FinalResponseBehavior. + /// is null. + public SetFinalResponseSettingsRequest(string finalResponseBehavior) + { + Argument.AssertNotNull(finalResponseBehavior, nameof(finalResponseBehavior)); + + FinalResponseBehavior = finalResponseBehavior; + } + + /// Initializes a new instance of SetFinalResponseSettingsRequest. + /// FinalResponseBehavior. + /// FinalResponseFormat. + /// FinalResponsePersona. + /// FinalResponseFallback. + internal SetFinalResponseSettingsRequest(string finalResponseBehavior, string finalResponseFormat, string finalResponsePersona, string finalResponseFallback) + { + FinalResponseBehavior = finalResponseBehavior; + FinalResponseFormat = finalResponseFormat; + FinalResponsePersona = finalResponsePersona; + FinalResponseFallback = finalResponseFallback; + } + + /// FinalResponseBehavior. + public string FinalResponseBehavior { get; } + /// FinalResponseFormat. + public string FinalResponseFormat { get; set; } + /// FinalResponsePersona. + public string FinalResponsePersona { get; set; } + /// FinalResponseFallback. + public string FinalResponseFallback { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.Serialization.cs new file mode 100644 index 000000000000..6e77f05523df --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.Serialization.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SetInputRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("inputName"u8); + writer.WriteStringValue(InputName); + if (Optional.IsDefined(DefaultValue)) + { + if (DefaultValue != null) + { + writer.WritePropertyName("defaultValue"u8); + writer.WriteObjectValue(DefaultValue); + } + else + { + writer.WriteNull("defaultValue"); + } + } + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.cs new file mode 100644 index 000000000000..5a2ba14c11d2 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SetInputRequest.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// SetInputRequest. + public partial class SetInputRequest + { + /// Initializes a new instance of SetInputRequest. + /// Input Name. + /// is null. + public SetInputRequest(string inputName) + { + Argument.AssertNotNull(inputName, nameof(inputName)); + + InputName = inputName; + } + + /// Initializes a new instance of SetInputRequest. + /// Input Name. + /// Default value for the input. + internal SetInputRequest(string inputName, SkillVariable defaultValue) + { + InputName = inputName; + DefaultValue = defaultValue; + } + + /// Input Name. + public string InputName { get; } + /// Default value for the input. + public SkillVariable DefaultValue { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.Serialization.cs new file mode 100644 index 000000000000..14d493a9fdd7 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillContextResponse + { + internal static SkillContextResponse DeserializeSkillContextResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SkillDescriptor descriptor = default; + string id = default; + IReadOnlyList featureFlags = default; + IReadOnlyDictionary inputs = default; + IReadOnlyDictionary properties = default; + DateTimeOffset startTime = default; + string tenantId = default; + string userId = default; + string sessionId = default; + string promptId = default; + string evaluationId = default; + ComplianceFlags complianceFlags = default; + string workspaceId = default; + string source = default; + EvaluationInvocationType invocationType = default; + EvaluationInvocationCategory invocationCategory = default; + string userName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("descriptor"u8)) + { + descriptor = SkillDescriptor.DeserializeSkillDescriptor(property.Value); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("featureFlags"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + featureFlags = array; + continue; + } + if (property.NameEquals("inputs"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SkillVariable.DeserializeSkillVariable(property0.Value)); + } + inputs = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("startTime"u8)) + { + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userId"u8)) + { + userId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sessionId"u8)) + { + sessionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("promptId"u8)) + { + promptId = property.Value.GetString(); + continue; + } + if (property.NameEquals("evaluationId"u8)) + { + evaluationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("complianceFlags"u8)) + { + complianceFlags = ComplianceFlags.DeserializeComplianceFlags(property.Value); + continue; + } + if (property.NameEquals("workspaceId"u8)) + { + workspaceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("invocationType"u8)) + { + invocationType = new EvaluationInvocationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("invocationCategory"u8)) + { + invocationCategory = new EvaluationInvocationCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("userName"u8)) + { + userName = property.Value.GetString(); + continue; + } + } + return new SkillContextResponse(descriptor, id, featureFlags, inputs, properties, startTime, tenantId, userId, sessionId, promptId, evaluationId, complianceFlags, workspaceId, source, invocationType, invocationCategory, userName); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillContextResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillContextResponse(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.cs new file mode 100644 index 000000000000..06383aa392ec --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillContextResponse.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// SkillContext object containing properties of the current session relevant to the invoked skill. + public partial class SkillContextResponse + { + /// Initializes a new instance of SkillContextResponse. + /// Skill descriptor containing attributes that describe a skill (i.e. Inputs required to execute the skill). + /// SkillContext Id. + /// Array of feature flags. + /// Skill Variable Collection. + /// Additional skill specific settings. + /// TODO. + /// Tenant id of tenant in which skill invocation occured. + /// User id of user that invoked the skill. + /// Current session ID. + /// Current prompt ID. + /// Current evaluation ID. + /// Compliance flags for logging. + /// Fidelis Workspace Id. + /// Originating source tag for the evaluation (i.e. Immersive, Logic Apps, etc.). + /// Indicates whether the evaluation is user driven or automated. + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + /// Username of the user that invoked the skill. + /// , , , , , , , , , , , , or is null. + internal SkillContextResponse(SkillDescriptor descriptor, string id, IEnumerable featureFlags, IReadOnlyDictionary inputs, IReadOnlyDictionary properties, DateTimeOffset startTime, string tenantId, string userId, string sessionId, string promptId, string evaluationId, ComplianceFlags complianceFlags, string workspaceId, string source, EvaluationInvocationType invocationType, EvaluationInvocationCategory invocationCategory, string userName) + { + Argument.AssertNotNull(descriptor, nameof(descriptor)); + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(featureFlags, nameof(featureFlags)); + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(tenantId, nameof(tenantId)); + Argument.AssertNotNull(userId, nameof(userId)); + Argument.AssertNotNull(sessionId, nameof(sessionId)); + Argument.AssertNotNull(promptId, nameof(promptId)); + Argument.AssertNotNull(evaluationId, nameof(evaluationId)); + Argument.AssertNotNull(complianceFlags, nameof(complianceFlags)); + Argument.AssertNotNull(workspaceId, nameof(workspaceId)); + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(userName, nameof(userName)); + + Descriptor = descriptor; + Id = id; + FeatureFlags = featureFlags.ToList(); + Inputs = inputs; + Properties = properties; + StartTime = startTime; + TenantId = tenantId; + UserId = userId; + SessionId = sessionId; + PromptId = promptId; + EvaluationId = evaluationId; + ComplianceFlags = complianceFlags; + WorkspaceId = workspaceId; + Source = source; + InvocationType = invocationType; + InvocationCategory = invocationCategory; + UserName = userName; + } + + /// Initializes a new instance of SkillContextResponse. + /// Skill descriptor containing attributes that describe a skill (i.e. Inputs required to execute the skill). + /// SkillContext Id. + /// Array of feature flags. + /// Skill Variable Collection. + /// Additional skill specific settings. + /// TODO. + /// Tenant id of tenant in which skill invocation occured. + /// User id of user that invoked the skill. + /// Current session ID. + /// Current prompt ID. + /// Current evaluation ID. + /// Compliance flags for logging. + /// Fidelis Workspace Id. + /// Originating source tag for the evaluation (i.e. Immersive, Logic Apps, etc.). + /// Indicates whether the evaluation is user driven or automated. + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + /// Username of the user that invoked the skill. + internal SkillContextResponse(SkillDescriptor descriptor, string id, IReadOnlyList featureFlags, IReadOnlyDictionary inputs, IReadOnlyDictionary properties, DateTimeOffset startTime, string tenantId, string userId, string sessionId, string promptId, string evaluationId, ComplianceFlags complianceFlags, string workspaceId, string source, EvaluationInvocationType invocationType, EvaluationInvocationCategory invocationCategory, string userName) + { + Descriptor = descriptor; + Id = id; + FeatureFlags = featureFlags; + Inputs = inputs; + Properties = properties; + StartTime = startTime; + TenantId = tenantId; + UserId = userId; + SessionId = sessionId; + PromptId = promptId; + EvaluationId = evaluationId; + ComplianceFlags = complianceFlags; + WorkspaceId = workspaceId; + Source = source; + InvocationType = invocationType; + InvocationCategory = invocationCategory; + UserName = userName; + } + + /// Skill descriptor containing attributes that describe a skill (i.e. Inputs required to execute the skill). + public SkillDescriptor Descriptor { get; } + /// SkillContext Id. + public string Id { get; } + /// Array of feature flags. + public IReadOnlyList FeatureFlags { get; } + /// Skill Variable Collection. + public IReadOnlyDictionary Inputs { get; } + /// Additional skill specific settings. + public IReadOnlyDictionary Properties { get; } + /// TODO. + public DateTimeOffset StartTime { get; } + /// Tenant id of tenant in which skill invocation occured. + public string TenantId { get; } + /// User id of user that invoked the skill. + public string UserId { get; } + /// Current session ID. + public string SessionId { get; } + /// Current prompt ID. + public string PromptId { get; } + /// Current evaluation ID. + public string EvaluationId { get; } + /// Compliance flags for logging. + public ComplianceFlags ComplianceFlags { get; } + /// Fidelis Workspace Id. + public string WorkspaceId { get; } + /// Originating source tag for the evaluation (i.e. Immersive, Logic Apps, etc.). + public string Source { get; } + /// Indicates whether the evaluation is user driven or automated. + public EvaluationInvocationType InvocationType { get; } + /// Indicates whether the evaluation is from a Prompt or a Promptbook. + public EvaluationInvocationCategory InvocationCategory { get; } + /// Username of the user that invoked the skill. + public string UserName { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.Serialization.cs new file mode 100644 index 000000000000..48ab43c0cb66 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillDependencyDescriptor + { + internal static SkillDependencyDescriptor DeserializeSkillDependencyDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string skillsetName = default; + string skillName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("skillsetName"u8)) + { + skillsetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("skillName"u8)) + { + skillName = property.Value.GetString(); + continue; + } + } + return new SkillDependencyDescriptor(skillsetName, skillName); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillDependencyDescriptor FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillDependencyDescriptor(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.cs new file mode 100644 index 000000000000..54111c3c7e81 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDependencyDescriptor.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The descriptor of a skill dependency. + public partial class SkillDependencyDescriptor + { + /// Initializes a new instance of SkillDependencyDescriptor. + /// The skillset name. + /// The name of the skill. + /// or is null. + internal SkillDependencyDescriptor(string skillsetName, string skillName) + { + Argument.AssertNotNull(skillsetName, nameof(skillsetName)); + Argument.AssertNotNull(skillName, nameof(skillName)); + + SkillsetName = skillsetName; + SkillName = skillName; + } + + /// The skillset name. + public string SkillsetName { get; } + /// The name of the skill. + public string SkillName { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.Serialization.cs new file mode 100644 index 000000000000..855d6c6bd932 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillDescriptor + { + internal static SkillDescriptor DeserializeSkillDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SkillsetDescriptor skillset = default; + string name = default; + string format = default; + string displayName = default; + string altName = default; + IReadOnlyList dependencies = default; + string description = default; + IReadOnlyList examplePrompts = default; + bool hidden = default; + IReadOnlyList inputs = default; + IReadOnlyList outputs = default; + string promptAlignedName = default; + IReadOnlyList userVisibilityFeatureFlags = default; + SkillVisibility userVisibility = default; + IReadOnlyList plannerVisibilityFeatureFlags = default; + SkillVisibility plannerVisibility = default; + IReadOnlyDictionary settings = default; + SkillSummaryDescriptor skillSummaryMetadata = default; + bool enableVariableSubstitutionInCompose = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("skillset"u8)) + { + skillset = SkillsetDescriptor.DeserializeSkillsetDescriptor(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("format"u8)) + { + format = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("altName"u8)) + { + altName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dependencies"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SkillDependencyDescriptor.DeserializeSkillDependencyDescriptor(item)); + } + dependencies = array; + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("examplePrompts"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + examplePrompts = array; + continue; + } + if (property.NameEquals("hidden"u8)) + { + hidden = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("inputs"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SkillInputDescriptor.DeserializeSkillInputDescriptor(item)); + } + inputs = array; + continue; + } + if (property.NameEquals("outputs"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SkillOutputDescriptor.DeserializeSkillOutputDescriptor(item)); + } + outputs = array; + continue; + } + if (property.NameEquals("promptAlignedName"u8)) + { + promptAlignedName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userVisibilityFeatureFlags"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + userVisibilityFeatureFlags = array; + continue; + } + if (property.NameEquals("userVisibility"u8)) + { + userVisibility = new SkillVisibility(property.Value.GetString()); + continue; + } + if (property.NameEquals("plannerVisibilityFeatureFlags"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + plannerVisibilityFeatureFlags = array; + continue; + } + if (property.NameEquals("plannerVisibility"u8)) + { + plannerVisibility = new SkillVisibility(property.Value.GetString()); + continue; + } + if (property.NameEquals("settings"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + settings = dictionary; + continue; + } + if (property.NameEquals("skillSummaryMetadata"u8)) + { + skillSummaryMetadata = SkillSummaryDescriptor.DeserializeSkillSummaryDescriptor(property.Value); + continue; + } + if (property.NameEquals("enableVariableSubstitutionInCompose"u8)) + { + enableVariableSubstitutionInCompose = property.Value.GetBoolean(); + continue; + } + } + return new SkillDescriptor(skillset, name, format, displayName, altName, dependencies, description, examplePrompts, hidden, inputs, outputs, promptAlignedName, userVisibilityFeatureFlags, userVisibility, plannerVisibilityFeatureFlags, plannerVisibility, settings, skillSummaryMetadata, enableVariableSubstitutionInCompose); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillDescriptor FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillDescriptor(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.cs new file mode 100644 index 000000000000..955fc784dbed --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillDescriptor.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The desciptor of a skill. + public partial class SkillDescriptor + { + /// Initializes a new instance of SkillDescriptor. + /// The skillset descriptor. + /// The name of the skill. + /// The format of the skill. + /// The display name of the skill. + /// An alternative name for the skill as some planners follow different naming convensions. This is set by the planner to map the name back to the skill. + /// The dependencies of the skill. + /// The description of the skill. + /// A list of example prompts for the skill. + /// Whether the skill is hidden TODO what does this mean. + /// The inputs required for the skill. + /// The outputs of the skill. + /// The prompt aligned name of the skill TODO what does this mean. + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + /// Controls the conditions under which the users can see or use this skillset. + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + /// Controls the conditions under a prompt can use this skillset. + /// The settings of the skill. + /// skillSummaryMetadata. + /// EnableVariableSubstitutionInCompose. + /// , , , , , , , , , , , , , or is null. + internal SkillDescriptor(SkillsetDescriptor skillset, string name, string format, string displayName, string altName, IEnumerable dependencies, string description, IEnumerable examplePrompts, bool hidden, IEnumerable inputs, IEnumerable outputs, string promptAlignedName, IEnumerable userVisibilityFeatureFlags, SkillVisibility userVisibility, IEnumerable plannerVisibilityFeatureFlags, SkillVisibility plannerVisibility, IReadOnlyDictionary settings, SkillSummaryDescriptor skillSummaryMetadata, bool enableVariableSubstitutionInCompose) + { + Argument.AssertNotNull(skillset, nameof(skillset)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(format, nameof(format)); + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(altName, nameof(altName)); + Argument.AssertNotNull(dependencies, nameof(dependencies)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(examplePrompts, nameof(examplePrompts)); + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(outputs, nameof(outputs)); + Argument.AssertNotNull(promptAlignedName, nameof(promptAlignedName)); + Argument.AssertNotNull(userVisibilityFeatureFlags, nameof(userVisibilityFeatureFlags)); + Argument.AssertNotNull(plannerVisibilityFeatureFlags, nameof(plannerVisibilityFeatureFlags)); + Argument.AssertNotNull(settings, nameof(settings)); + Argument.AssertNotNull(skillSummaryMetadata, nameof(skillSummaryMetadata)); + + Skillset = skillset; + Name = name; + Format = format; + DisplayName = displayName; + AltName = altName; + Dependencies = dependencies.ToList(); + Description = description; + ExamplePrompts = examplePrompts.ToList(); + Hidden = hidden; + Inputs = inputs.ToList(); + Outputs = outputs.ToList(); + PromptAlignedName = promptAlignedName; + UserVisibilityFeatureFlags = userVisibilityFeatureFlags.ToList(); + UserVisibility = userVisibility; + PlannerVisibilityFeatureFlags = plannerVisibilityFeatureFlags.ToList(); + PlannerVisibility = plannerVisibility; + Settings = settings; + SkillSummaryMetadata = skillSummaryMetadata; + EnableVariableSubstitutionInCompose = enableVariableSubstitutionInCompose; + } + + /// Initializes a new instance of SkillDescriptor. + /// The skillset descriptor. + /// The name of the skill. + /// The format of the skill. + /// The display name of the skill. + /// An alternative name for the skill as some planners follow different naming convensions. This is set by the planner to map the name back to the skill. + /// The dependencies of the skill. + /// The description of the skill. + /// A list of example prompts for the skill. + /// Whether the skill is hidden TODO what does this mean. + /// The inputs required for the skill. + /// The outputs of the skill. + /// The prompt aligned name of the skill TODO what does this mean. + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + /// Controls the conditions under which the users can see or use this skillset. + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + /// Controls the conditions under a prompt can use this skillset. + /// The settings of the skill. + /// skillSummaryMetadata. + /// EnableVariableSubstitutionInCompose. + internal SkillDescriptor(SkillsetDescriptor skillset, string name, string format, string displayName, string altName, IReadOnlyList dependencies, string description, IReadOnlyList examplePrompts, bool hidden, IReadOnlyList inputs, IReadOnlyList outputs, string promptAlignedName, IReadOnlyList userVisibilityFeatureFlags, SkillVisibility userVisibility, IReadOnlyList plannerVisibilityFeatureFlags, SkillVisibility plannerVisibility, IReadOnlyDictionary settings, SkillSummaryDescriptor skillSummaryMetadata, bool enableVariableSubstitutionInCompose) + { + Skillset = skillset; + Name = name; + Format = format; + DisplayName = displayName; + AltName = altName; + Dependencies = dependencies; + Description = description; + ExamplePrompts = examplePrompts; + Hidden = hidden; + Inputs = inputs; + Outputs = outputs; + PromptAlignedName = promptAlignedName; + UserVisibilityFeatureFlags = userVisibilityFeatureFlags; + UserVisibility = userVisibility; + PlannerVisibilityFeatureFlags = plannerVisibilityFeatureFlags; + PlannerVisibility = plannerVisibility; + Settings = settings; + SkillSummaryMetadata = skillSummaryMetadata; + EnableVariableSubstitutionInCompose = enableVariableSubstitutionInCompose; + } + + /// The skillset descriptor. + public SkillsetDescriptor Skillset { get; } + /// The name of the skill. + public string Name { get; } + /// The format of the skill. + public string Format { get; } + /// The display name of the skill. + public string DisplayName { get; } + /// An alternative name for the skill as some planners follow different naming convensions. This is set by the planner to map the name back to the skill. + public string AltName { get; } + /// The dependencies of the skill. + public IReadOnlyList Dependencies { get; } + /// The description of the skill. + public string Description { get; } + /// A list of example prompts for the skill. + public IReadOnlyList ExamplePrompts { get; } + /// Whether the skill is hidden TODO what does this mean. + public bool Hidden { get; } + /// The inputs required for the skill. + public IReadOnlyList Inputs { get; } + /// The outputs of the skill. + public IReadOnlyList Outputs { get; } + /// The prompt aligned name of the skill TODO what does this mean. + public string PromptAlignedName { get; } + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + public IReadOnlyList UserVisibilityFeatureFlags { get; } + /// Controls the conditions under which the users can see or use this skillset. + public SkillVisibility UserVisibility { get; } + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + public IReadOnlyList PlannerVisibilityFeatureFlags { get; } + /// Controls the conditions under a prompt can use this skillset. + public SkillVisibility PlannerVisibility { get; } + /// The settings of the skill. + public IReadOnlyDictionary Settings { get; } + /// skillSummaryMetadata. + public SkillSummaryDescriptor SkillSummaryMetadata { get; } + /// EnableVariableSubstitutionInCompose. + public bool EnableVariableSubstitutionInCompose { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.Serialization.cs new file mode 100644 index 000000000000..2b39a2b203cf --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillInputDescriptor + { + internal static SkillInputDescriptor DeserializeSkillInputDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + SkillTypeDescriptor type = default; + Optional description = default; + bool required = default; + Optional defaultValue = default; + string placeholderValue = default; + IReadOnlyList @enum = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = SkillTypeDescriptor.DeserializeSkillTypeDescriptor(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("required"u8)) + { + required = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultValue"u8)) + { + defaultValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("placeholderValue"u8)) + { + placeholderValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("enum"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + @enum = new ChangeTrackingList(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + @enum = array; + continue; + } + } + return new SkillInputDescriptor(name.Value, type, description.Value, required, defaultValue.Value, placeholderValue, @enum); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillInputDescriptor FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillInputDescriptor(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.cs new file mode 100644 index 000000000000..6e84f28e34ef --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillInputDescriptor.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The descriptor of a skill input. + public partial class SkillInputDescriptor + { + /// Initializes a new instance of SkillInputDescriptor. + /// The type of the skill input. + /// Whether a skill input is required. + /// The placeholder value of the skill input TODO how is this different than the default. + /// Enum. + /// or is null. + internal SkillInputDescriptor(SkillTypeDescriptor type, bool required, string placeholderValue, IEnumerable @enum) + { + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(placeholderValue, nameof(placeholderValue)); + + Type = type; + Required = required; + PlaceholderValue = placeholderValue; + Enum = @enum?.ToList(); + } + + /// Initializes a new instance of SkillInputDescriptor. + /// The name of the skill input. + /// The type of the skill input. + /// The description of the skill. + /// Whether a skill input is required. + /// The default value of the skill input. + /// The placeholder value of the skill input TODO how is this different than the default. + /// Enum. + internal SkillInputDescriptor(string name, SkillTypeDescriptor type, string description, bool required, string defaultValue, string placeholderValue, IReadOnlyList @enum) + { + Name = name; + Type = type; + Description = description; + Required = required; + DefaultValue = defaultValue; + PlaceholderValue = placeholderValue; + Enum = @enum; + } + + /// The name of the skill input. + public string Name { get; } + /// The type of the skill input. + public SkillTypeDescriptor Type { get; } + /// The description of the skill. + public string Description { get; } + /// Whether a skill input is required. + public bool Required { get; } + /// The default value of the skill input. + public string DefaultValue { get; } + /// The placeholder value of the skill input TODO how is this different than the default. + public string PlaceholderValue { get; } + /// Enum. + public IReadOnlyList Enum { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.Serialization.cs new file mode 100644 index 000000000000..de606a161f83 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.Serialization.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillOutputComponent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.ToString()); + writer.WritePropertyName("includeInEvalResultAsRawComponent"u8); + writer.WriteBooleanValue(IncludeInEvalResultAsRawComponent); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("content"u8); + writer.WriteStringValue(Content); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.cs new file mode 100644 index 000000000000..49116e217643 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponent.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The SkillOutputComponent. + public partial class SkillOutputComponent : OutputComponent + { + /// Initializes a new instance of SkillOutputComponent. + /// + /// + /// + /// + /// + /// , or is null. + public SkillOutputComponent(string name, string content, string type, SkillOutputComponentAction action, bool includeInEvalResultAsRawComponent) : base(name, content, type) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(type, nameof(type)); + + Action = action; + IncludeInEvalResultAsRawComponent = includeInEvalResultAsRawComponent; + } + + /// Initializes a new instance of SkillOutputComponent. + /// + /// + /// + /// + /// + /// + internal SkillOutputComponent(string name, string content, string description, string type, SkillOutputComponentAction action, bool includeInEvalResultAsRawComponent) : base(name, content, description, type) + { + Action = action; + IncludeInEvalResultAsRawComponent = includeInEvalResultAsRawComponent; + } + + /// Gets the action. + public SkillOutputComponentAction Action { get; } + /// Gets the include in eval result as raw component. + public bool IncludeInEvalResultAsRawComponent { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponentAction.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponentAction.cs new file mode 100644 index 000000000000..58c937a5aa7b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputComponentAction.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public readonly partial struct SkillOutputComponentAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillOutputComponentAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string SummarizeValue = "Summarize"; + private const string SubstituteValue = "Substitute"; + + /// None. + public static SkillOutputComponentAction None { get; } = new SkillOutputComponentAction(NoneValue); + /// Summarize. + public static SkillOutputComponentAction Summarize { get; } = new SkillOutputComponentAction(SummarizeValue); + /// Substitute. + public static SkillOutputComponentAction Substitute { get; } = new SkillOutputComponentAction(SubstituteValue); + /// Determines if two values are the same. + public static bool operator ==(SkillOutputComponentAction left, SkillOutputComponentAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillOutputComponentAction left, SkillOutputComponentAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillOutputComponentAction(string value) => new SkillOutputComponentAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillOutputComponentAction other && Equals(other); + /// + public bool Equals(SkillOutputComponentAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.Serialization.cs new file mode 100644 index 000000000000..c92a0329f19a --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillOutputDescriptor + { + internal static SkillOutputDescriptor DeserializeSkillOutputDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + SkillTypeDescriptor type = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = SkillTypeDescriptor.DeserializeSkillTypeDescriptor(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + } + return new SkillOutputDescriptor(name.Value, type, description.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillOutputDescriptor FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillOutputDescriptor(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.cs new file mode 100644 index 000000000000..81e6b7d93da5 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputDescriptor.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The descriptor of a skill output. + public partial class SkillOutputDescriptor + { + /// Initializes a new instance of SkillOutputDescriptor. + /// The type of the skill input. + /// is null. + internal SkillOutputDescriptor(SkillTypeDescriptor type) + { + Argument.AssertNotNull(type, nameof(type)); + + Type = type; + } + + /// Initializes a new instance of SkillOutputDescriptor. + /// The name of the skill input. + /// The type of the skill input. + /// The description of the skill. + internal SkillOutputDescriptor(string name, SkillTypeDescriptor type, string description) + { + Name = name; + Type = type; + Description = description; + } + + /// The name of the skill input. + public string Name { get; } + /// The type of the skill input. + public SkillTypeDescriptor Type { get; } + /// The description of the skill. + public string Description { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputType.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputType.cs new file mode 100644 index 000000000000..2df58821efef --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillOutputType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Skill Output type enum. Supports StructuredOutput and Primitive. + public readonly partial struct SkillOutputType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillOutputType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimitiveValue = "Primitive"; + private const string StructuredComponentsValue = "StructuredComponents"; + + /// Primitive. + public static SkillOutputType Primitive { get; } = new SkillOutputType(PrimitiveValue); + /// Structured Components. + public static SkillOutputType StructuredComponents { get; } = new SkillOutputType(StructuredComponentsValue); + /// Determines if two values are the same. + public static bool operator ==(SkillOutputType left, SkillOutputType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillOutputType left, SkillOutputType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillOutputType(string value) => new SkillOutputType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillOutputType other && Equals(other); + /// + public bool Equals(SkillOutputType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillPreviewState.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillPreviewState.cs new file mode 100644 index 000000000000..9c7a1ccffb22 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillPreviewState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Used to configure the preview state of a skill. + public readonly partial struct SkillPreviewState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillPreviewState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GAValue = "GA"; + private const string PublicValue = "Public"; + private const string PrivateValue = "Private"; + + /// GA. + public static SkillPreviewState GA { get; } = new SkillPreviewState(GAValue); + /// Public. + public static SkillPreviewState Public { get; } = new SkillPreviewState(PublicValue); + /// Private. + public static SkillPreviewState Private { get; } = new SkillPreviewState(PrivateValue); + /// Determines if two values are the same. + public static bool operator ==(SkillPreviewState left, SkillPreviewState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillPreviewState left, SkillPreviewState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillPreviewState(string value) => new SkillPreviewState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillPreviewState other && Equals(other); + /// + public bool Equals(SkillPreviewState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.Serialization.cs new file mode 100644 index 000000000000..76e4237618b2 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.Serialization.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillSource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("sourceContent"u8); + writer.WriteStringValue(SourceContent); + writer.WritePropertyName("sourceType"u8); + writer.WriteStringValue(SourceType.ToString()); + if (Optional.IsDefined(SourceSerializedData)) + { + if (SourceSerializedData != null) + { + writer.WritePropertyName("sourceSerializedData"u8); + writer.WriteStringValue(SourceSerializedData); + } + else + { + writer.WriteNull("sourceSerializedData"); + } + } + writer.WriteEndObject(); + } + + internal static SkillSource DeserializeSkillSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string sourceContent = default; + SkillSourceType sourceType = default; + Optional sourceSerializedData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceContent"u8)) + { + sourceContent = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceType"u8)) + { + sourceType = new SkillSourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceSerializedData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sourceSerializedData = null; + continue; + } + sourceSerializedData = property.Value.GetString(); + continue; + } + } + return new SkillSource(displayName, sourceContent, sourceType, sourceSerializedData.Value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillSource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillSource(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.cs new file mode 100644 index 000000000000..880bfc6b4b9d --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSource.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Source that is fetched during the evaluation of a skill. Provides visibility to users as to what data/information was used in generating the output of a skill. + public partial class SkillSource + { + /// Initializes a new instance of SkillSource. + /// User friendly name for the information source. + /// Information source content (i.e. URL to article). + /// The source type (i.e. URI). + /// or is null. + public SkillSource(string displayName, string sourceContent, SkillSourceType sourceType) + { + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(sourceContent, nameof(sourceContent)); + + DisplayName = displayName; + SourceContent = sourceContent; + SourceType = sourceType; + } + + /// Initializes a new instance of SkillSource. + /// User friendly name for the information source. + /// Information source content (i.e. URL to article). + /// The source type (i.e. URI). + /// Source data serialized as string. + internal SkillSource(string displayName, string sourceContent, SkillSourceType sourceType, string sourceSerializedData) + { + DisplayName = displayName; + SourceContent = sourceContent; + SourceType = sourceType; + SourceSerializedData = sourceSerializedData; + } + + /// User friendly name for the information source. + public string DisplayName { get; set; } + /// Information source content (i.e. URL to article). + public string SourceContent { get; set; } + /// The source type (i.e. URI). + public SkillSourceType SourceType { get; set; } + /// Source data serialized as string. + public string SourceSerializedData { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSourceType.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSourceType.cs new file mode 100644 index 000000000000..7e5f319f6f71 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSourceType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The type for a source that was used in generating the output of a skill. + public readonly partial struct SkillSourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillSourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UriValue = "Uri"; + private const string StringTypeValue = "StringType"; + + /// Uri. + public static SkillSourceType Uri { get; } = new SkillSourceType(UriValue); + /// StringType. + public static SkillSourceType StringType { get; } = new SkillSourceType(StringTypeValue); + /// Determines if two values are the same. + public static bool operator ==(SkillSourceType left, SkillSourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillSourceType left, SkillSourceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillSourceType(string value) => new SkillSourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillSourceType other && Equals(other); + /// + public bool Equals(SkillSourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.Serialization.cs new file mode 100644 index 000000000000..ce653407e8fc --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillStructuredOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("components"u8); + writer.WriteStartArray(); + foreach (var item in Components) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.cs new file mode 100644 index 000000000000..08333929cc95 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillStructuredOutput.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The SkillStructuredOutput. + public partial class SkillStructuredOutput + { + /// Initializes a new instance of SkillStructuredOutput. + /// + /// is null. + public SkillStructuredOutput(IEnumerable components) + { + Argument.AssertNotNull(components, nameof(components)); + + Components = components.ToList(); + } + + /// Initializes a new instance of SkillStructuredOutput. + /// + internal SkillStructuredOutput(IList components) + { + Components = components; + } + + /// Gets the components. + public IList Components { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.Serialization.cs new file mode 100644 index 000000000000..ecb51ea49a8b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillSummaryDescriptor + { + internal static SkillSummaryDescriptor DeserializeSkillSummaryDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string summaryStartMessage = default; + string summaryEndMessage = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("summaryStartMessage"u8)) + { + summaryStartMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("summaryEndMessage"u8)) + { + summaryEndMessage = property.Value.GetString(); + continue; + } + } + return new SkillSummaryDescriptor(summaryStartMessage, summaryEndMessage); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillSummaryDescriptor FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillSummaryDescriptor(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.cs new file mode 100644 index 000000000000..2872a9c988db --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillSummaryDescriptor.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// SkillSummaryDescriptor. + public partial class SkillSummaryDescriptor + { + /// Initializes a new instance of SkillSummaryDescriptor. + /// SummaryStartMessage. + /// SummaryEndMessage. + /// or is null. + internal SkillSummaryDescriptor(string summaryStartMessage, string summaryEndMessage) + { + Argument.AssertNotNull(summaryStartMessage, nameof(summaryStartMessage)); + Argument.AssertNotNull(summaryEndMessage, nameof(summaryEndMessage)); + + SummaryStartMessage = summaryStartMessage; + SummaryEndMessage = summaryEndMessage; + } + + /// SummaryStartMessage. + public string SummaryStartMessage { get; } + /// SummaryEndMessage. + public string SummaryEndMessage { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.Serialization.cs new file mode 100644 index 000000000000..bdb00a892092 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.Serialization.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillTypeDescriptor + { + internal static SkillTypeDescriptor DeserializeSkillTypeDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + } + return new SkillTypeDescriptor(name); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillTypeDescriptor FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillTypeDescriptor(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.cs new file mode 100644 index 000000000000..089d1818fee6 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillTypeDescriptor.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The descriptor of a skill type. + public partial class SkillTypeDescriptor + { + /// Initializes a new instance of SkillTypeDescriptor. + /// The name of the skill type. + /// is null. + internal SkillTypeDescriptor(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// The name of the skill type. + public string Name { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.Serialization.cs new file mode 100644 index 000000000000..5097b6ffa716 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillVariable : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + writer.WritePropertyName("valueStoredAsJson"u8); + writer.WriteBooleanValue(ValueStoredAsJson); + writer.WriteEndObject(); + } + + internal static SkillVariable DeserializeSkillVariable(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional type = default; + Optional value = default; + bool valueStoredAsJson = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueStoredAsJson"u8)) + { + valueStoredAsJson = property.Value.GetBoolean(); + continue; + } + } + return new SkillVariable(type.Value, value.Value, valueStoredAsJson); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillVariable FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillVariable(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.cs new file mode 100644 index 000000000000..617d3738a1e9 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVariable.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Skill Variable. + public partial class SkillVariable + { + /// Initializes a new instance of SkillVariable. + /// Skill variable value is stored as json document. + public SkillVariable(bool valueStoredAsJson) + { + ValueStoredAsJson = valueStoredAsJson; + } + + /// Initializes a new instance of SkillVariable. + /// Skill variable type. + /// Skill variable value. + /// Skill variable value is stored as json document. + internal SkillVariable(string type, string value, bool valueStoredAsJson) + { + Type = type; + Value = value; + ValueStoredAsJson = valueStoredAsJson; + } + + /// Skill variable type. + public string Type { get; set; } + /// Skill variable value. + public string Value { get; set; } + /// Skill variable value is stored as json document. + public bool ValueStoredAsJson { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVisibility.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVisibility.cs new file mode 100644 index 000000000000..ccc6685a2803 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillVisibility.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Defines the conditions under which the users can see or use a skillset. + public readonly partial struct SkillVisibility : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillVisibility(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AlwaysValue = "Always"; + private const string NeverValue = "Never"; + private const string IfFeatureFlagEnabledValue = "IfFeatureFlagEnabled"; + + /// Always visible. + public static SkillVisibility Always { get; } = new SkillVisibility(AlwaysValue); + /// Never visible. + public static SkillVisibility Never { get; } = new SkillVisibility(NeverValue); + /// Visible when any of an associated list of feature flags are enabled. + public static SkillVisibility IfFeatureFlagEnabled { get; } = new SkillVisibility(IfFeatureFlagEnabledValue); + /// Determines if two values are the same. + public static bool operator ==(SkillVisibility left, SkillVisibility right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillVisibility left, SkillVisibility right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillVisibility(string value) => new SkillVisibility(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillVisibility other && Equals(other); + /// + public bool Equals(SkillVisibility other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.Serialization.cs new file mode 100644 index 000000000000..250df0958d07 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.Serialization.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillsetAuth + { + internal static SkillsetAuth DeserializeSkillsetAuth(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SkillsetAuthType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new SkillsetAuthType(property.Value.GetString()); + continue; + } + } + return new SkillsetAuth(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillsetAuth FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillsetAuth(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.cs new file mode 100644 index 000000000000..88e7f3896cc1 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuth.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The authorization settings for the skillset. + public partial class SkillsetAuth + { + /// Initializes a new instance of SkillsetAuth. + /// SkillsetAuth Type. + internal SkillsetAuth(SkillsetAuthType type) + { + Type = type; + } + + /// SkillsetAuth Type. + public SkillsetAuthType Type { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuthType.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuthType.cs new file mode 100644 index 000000000000..26d1f12c5710 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetAuthType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Defines the authentication types supported by a skillset. + public readonly partial struct SkillsetAuthType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillsetAuthType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string BasicValue = "Basic"; + private const string ApiKeyValue = "ApiKey"; + private const string OAuthAuthorizationCodeFlowValue = "OAuthAuthorizationCodeFlow"; + private const string OAuthClientCredentialsFlowValue = "OAuthClientCredentialsFlow"; + private const string AADValue = "AAD"; + private const string ServiceHttpValue = "ServiceHttp"; + private const string AADDelegatedValue = "AADDelegated"; + + /// The skillset supports no authentication. + public static SkillsetAuthType None { get; } = new SkillsetAuthType(NoneValue); + /// The skillset supports basic authentication TODO what does this mean. + public static SkillsetAuthType Basic { get; } = new SkillsetAuthType(BasicValue); + /// The skillset supports API key authentication TO what does this mean. + public static SkillsetAuthType ApiKey { get; } = new SkillsetAuthType(ApiKeyValue); + /// The skillset supports OAuth authorization code flow authentication TODO what does this mean. + public static SkillsetAuthType OAuthAuthorizationCodeFlow { get; } = new SkillsetAuthType(OAuthAuthorizationCodeFlowValue); + /// The skillset supports OAuth client credentials flow TODO what does this mean. + public static SkillsetAuthType OAuthClientCredentialsFlow { get; } = new SkillsetAuthType(OAuthClientCredentialsFlowValue); + /// The skillset supports AAD authentication. + public static SkillsetAuthType AAD { get; } = new SkillsetAuthType(AADValue); + /// The skillset supports service HTTP authentication TODO what does this mean. + public static SkillsetAuthType ServiceHttp { get; } = new SkillsetAuthType(ServiceHttpValue); + /// The skillset supports AAD delegated authentication TODO what does this mean. + public static SkillsetAuthType AADDelegated { get; } = new SkillsetAuthType(AADDelegatedValue); + /// Determines if two values are the same. + public static bool operator ==(SkillsetAuthType left, SkillsetAuthType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillsetAuthType left, SkillsetAuthType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillsetAuthType(string value) => new SkillsetAuthType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillsetAuthType other && Equals(other); + /// + public bool Equals(SkillsetAuthType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCatalogScope.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCatalogScope.cs new file mode 100644 index 000000000000..61c253ff4d18 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCatalogScope.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// The scope of a skillset in the skillset catalog. + public readonly partial struct SkillsetCatalogScope : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillsetCatalogScope(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UserValue = "User"; + private const string WorkspaceValue = "Workspace"; + private const string TenantValue = "Tenant"; + private const string GlobalValue = "Global"; + + /// No scope specified. + public static SkillsetCatalogScope None { get; } = new SkillsetCatalogScope(NoneValue); + /// The skillset is scoped to the calling user. + public static SkillsetCatalogScope User { get; } = new SkillsetCatalogScope(UserValue); + /// The skillset is scoped to the calling user's workspace TODO what does this mean. + public static SkillsetCatalogScope Workspace { get; } = new SkillsetCatalogScope(WorkspaceValue); + /// The skillset is scoped to the calling user's tenant. + public static SkillsetCatalogScope Tenant { get; } = new SkillsetCatalogScope(TenantValue); + /// The skillset is available globally. + public static SkillsetCatalogScope Global { get; } = new SkillsetCatalogScope(GlobalValue); + /// Determines if two values are the same. + public static bool operator ==(SkillsetCatalogScope left, SkillsetCatalogScope right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillsetCatalogScope left, SkillsetCatalogScope right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillsetCatalogScope(string value) => new SkillsetCatalogScope(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillsetCatalogScope other && Equals(other); + /// + public bool Equals(SkillsetCatalogScope other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCategory.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCategory.cs new file mode 100644 index 000000000000..69efaa4cc088 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetCategory.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Defines the category of the data source/API that the skillset interacts with. + public readonly partial struct SkillsetCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillsetCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HiddenValue = "Hidden"; + private const string MicrosoftValue = "Microsoft"; + private const string OtherValue = "Other"; + private const string WebValue = "Web"; + private const string TestingValue = "Testing"; + private const string PluginValue = "Plugin"; + + /// Default value if a category is not specified. The skillset willnot appear in the UI. + public static SkillsetCategory Hidden { get; } = new SkillsetCategory(HiddenValue); + /// The skillset interacts with Microsoft services only. + public static SkillsetCategory Microsoft { get; } = new SkillsetCategory(MicrosoftValue); + /// The skillset interacts with 3rd party service. + public static SkillsetCategory Other { get; } = new SkillsetCategory(OtherValue); + /// The skillset interacts with public facing web services. + public static SkillsetCategory Web { get; } = new SkillsetCategory(WebValue); + /// The skillset is used for testing and debugging purposes. + public static SkillsetCategory Testing { get; } = new SkillsetCategory(TestingValue); + /// THe skillset of of a plugin format, such as ChatGPT or LogicApp plugins. + public static SkillsetCategory Plugin { get; } = new SkillsetCategory(PluginValue); + /// Determines if two values are the same. + public static bool operator ==(SkillsetCategory left, SkillsetCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillsetCategory left, SkillsetCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillsetCategory(string value) => new SkillsetCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillsetCategory other && Equals(other); + /// + public bool Equals(SkillsetCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.Serialization.cs new file mode 100644 index 000000000000..996c3f23a835 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillsetDescriptor + { + internal static SkillsetDescriptor DeserializeSkillsetDescriptor(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string @namespace = default; + string name = default; + string description = default; + string descriptionDisplay = default; + string disaplyName = default; + string icon = default; + SkillsetCategory category = default; + SkillsetCatalogScope catalogScope = default; + bool enabled = default; + bool hidden = default; + IReadOnlyList prerequisites = default; + IReadOnlyList settings = default; + SkillsetAuth authorization = default; + IReadOnlyList supportedAuthTypes = default; + IReadOnlyList userVisibilityFeatureFlags = default; + SkillVisibility userVisibility = default; + IReadOnlyList plannerVisibilityFeatureFlags = default; + SkillVisibility plannerVisibility = default; + string creatorUserId = default; + string ownersGroupId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namespace"u8)) + { + @namespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("descriptionDisplay"u8)) + { + descriptionDisplay = property.Value.GetString(); + continue; + } + if (property.NameEquals("disaplyName"u8)) + { + disaplyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("icon"u8)) + { + icon = property.Value.GetString(); + continue; + } + if (property.NameEquals("category"u8)) + { + category = new SkillsetCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("catalogScope"u8)) + { + catalogScope = new SkillsetCatalogScope(property.Value.GetString()); + continue; + } + if (property.NameEquals("enabled"u8)) + { + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("hidden"u8)) + { + hidden = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("prerequisites"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + prerequisites = new ChangeTrackingList(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + prerequisites = array; + continue; + } + if (property.NameEquals("settings"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SkillsetSetting.DeserializeSkillsetSetting(item)); + } + settings = array; + continue; + } + if (property.NameEquals("authorization"u8)) + { + authorization = SkillsetAuth.DeserializeSkillsetAuth(property.Value); + continue; + } + if (property.NameEquals("supportedAuthTypes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new SkillsetAuthType(item.GetString())); + } + supportedAuthTypes = array; + continue; + } + if (property.NameEquals("userVisibilityFeatureFlags"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + userVisibilityFeatureFlags = array; + continue; + } + if (property.NameEquals("userVisibility"u8)) + { + userVisibility = new SkillVisibility(property.Value.GetString()); + continue; + } + if (property.NameEquals("plannerVisibilityFeatureFlags"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + plannerVisibilityFeatureFlags = array; + continue; + } + if (property.NameEquals("plannerVisibility"u8)) + { + plannerVisibility = new SkillVisibility(property.Value.GetString()); + continue; + } + if (property.NameEquals("creatorUserId"u8)) + { + creatorUserId = property.Value.GetString(); + continue; + } + if (property.NameEquals("ownersGroupId"u8)) + { + ownersGroupId = property.Value.GetString(); + continue; + } + } + return new SkillsetDescriptor(@namespace, name, description, descriptionDisplay, disaplyName, icon, category, catalogScope, enabled, hidden, prerequisites, settings, authorization, supportedAuthTypes, userVisibilityFeatureFlags, userVisibility, plannerVisibilityFeatureFlags, plannerVisibility, creatorUserId, ownersGroupId); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillsetDescriptor FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillsetDescriptor(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.cs new file mode 100644 index 000000000000..b6846a6040c4 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetDescriptor.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Entity representing a Skillset. + public partial class SkillsetDescriptor + { + /// Initializes a new instance of SkillsetDescriptor. + /// Namespace for the skillset. + /// The name of the Skillset. + /// The description of the Skillset. + /// The description of the skillset that's displayed TODO postman/dev figure out where this is displayed. + /// The Skillset name that's displayed in the portal. + /// The icon displayed for the skillset in the console. + /// The category of the Skillset. + /// CatalogScope of the Skillset. + /// Whether the skillset is enabled TODO how is this different than Hidden. + /// Whether the skillset is hidden TODO how is this different than enabled. + /// The prerequisites of a skillset TODO what does this mean. + /// The settings of a skillset. + /// The settings of a skillset. + /// The types of authentication supported by the skillset. + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + /// Controls the conditions under which the users can see or use this skillset. + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + /// Controls the conditions under a prompt can use this skillset. + /// The user ID of the user who created this skillset. + /// The ID of an Entra group that contains the owners for this Skillset. + /// , , , , , , , , , , , or is null. + internal SkillsetDescriptor(string @namespace, string name, string description, string descriptionDisplay, string disaplyName, string icon, SkillsetCategory category, SkillsetCatalogScope catalogScope, bool enabled, bool hidden, IEnumerable prerequisites, IEnumerable settings, SkillsetAuth authorization, IEnumerable supportedAuthTypes, IEnumerable userVisibilityFeatureFlags, SkillVisibility userVisibility, IEnumerable plannerVisibilityFeatureFlags, SkillVisibility plannerVisibility, string creatorUserId, string ownersGroupId) + { + Argument.AssertNotNull(@namespace, nameof(@namespace)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(descriptionDisplay, nameof(descriptionDisplay)); + Argument.AssertNotNull(disaplyName, nameof(disaplyName)); + Argument.AssertNotNull(icon, nameof(icon)); + Argument.AssertNotNull(settings, nameof(settings)); + Argument.AssertNotNull(authorization, nameof(authorization)); + Argument.AssertNotNull(supportedAuthTypes, nameof(supportedAuthTypes)); + Argument.AssertNotNull(userVisibilityFeatureFlags, nameof(userVisibilityFeatureFlags)); + Argument.AssertNotNull(plannerVisibilityFeatureFlags, nameof(plannerVisibilityFeatureFlags)); + Argument.AssertNotNull(creatorUserId, nameof(creatorUserId)); + Argument.AssertNotNull(ownersGroupId, nameof(ownersGroupId)); + + Namespace = @namespace; + Name = name; + Description = description; + DescriptionDisplay = descriptionDisplay; + DisaplyName = disaplyName; + Icon = icon; + Category = category; + CatalogScope = catalogScope; + Enabled = enabled; + Hidden = hidden; + Prerequisites = prerequisites?.ToList(); + Settings = settings.ToList(); + Authorization = authorization; + SupportedAuthTypes = supportedAuthTypes.ToList(); + UserVisibilityFeatureFlags = userVisibilityFeatureFlags.ToList(); + UserVisibility = userVisibility; + PlannerVisibilityFeatureFlags = plannerVisibilityFeatureFlags.ToList(); + PlannerVisibility = plannerVisibility; + CreatorUserId = creatorUserId; + OwnersGroupId = ownersGroupId; + } + + /// Initializes a new instance of SkillsetDescriptor. + /// Namespace for the skillset. + /// The name of the Skillset. + /// The description of the Skillset. + /// The description of the skillset that's displayed TODO postman/dev figure out where this is displayed. + /// The Skillset name that's displayed in the portal. + /// The icon displayed for the skillset in the console. + /// The category of the Skillset. + /// CatalogScope of the Skillset. + /// Whether the skillset is enabled TODO how is this different than Hidden. + /// Whether the skillset is hidden TODO how is this different than enabled. + /// The prerequisites of a skillset TODO what does this mean. + /// The settings of a skillset. + /// The settings of a skillset. + /// The types of authentication supported by the skillset. + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + /// Controls the conditions under which the users can see or use this skillset. + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + /// Controls the conditions under a prompt can use this skillset. + /// The user ID of the user who created this skillset. + /// The ID of an Entra group that contains the owners for this Skillset. + internal SkillsetDescriptor(string @namespace, string name, string description, string descriptionDisplay, string disaplyName, string icon, SkillsetCategory category, SkillsetCatalogScope catalogScope, bool enabled, bool hidden, IReadOnlyList prerequisites, IReadOnlyList settings, SkillsetAuth authorization, IReadOnlyList supportedAuthTypes, IReadOnlyList userVisibilityFeatureFlags, SkillVisibility userVisibility, IReadOnlyList plannerVisibilityFeatureFlags, SkillVisibility plannerVisibility, string creatorUserId, string ownersGroupId) + { + Namespace = @namespace; + Name = name; + Description = description; + DescriptionDisplay = descriptionDisplay; + DisaplyName = disaplyName; + Icon = icon; + Category = category; + CatalogScope = catalogScope; + Enabled = enabled; + Hidden = hidden; + Prerequisites = prerequisites; + Settings = settings; + Authorization = authorization; + SupportedAuthTypes = supportedAuthTypes; + UserVisibilityFeatureFlags = userVisibilityFeatureFlags; + UserVisibility = userVisibility; + PlannerVisibilityFeatureFlags = plannerVisibilityFeatureFlags; + PlannerVisibility = plannerVisibility; + CreatorUserId = creatorUserId; + OwnersGroupId = ownersGroupId; + } + + /// Namespace for the skillset. + public string Namespace { get; } + /// The name of the Skillset. + public string Name { get; } + /// The description of the Skillset. + public string Description { get; } + /// The description of the skillset that's displayed TODO postman/dev figure out where this is displayed. + public string DescriptionDisplay { get; } + /// The Skillset name that's displayed in the portal. + public string DisaplyName { get; } + /// The icon displayed for the skillset in the console. + public string Icon { get; } + /// The category of the Skillset. + public SkillsetCategory Category { get; } + /// CatalogScope of the Skillset. + public SkillsetCatalogScope CatalogScope { get; } + /// Whether the skillset is enabled TODO how is this different than Hidden. + public bool Enabled { get; } + /// Whether the skillset is hidden TODO how is this different than enabled. + public bool Hidden { get; } + /// The prerequisites of a skillset TODO what does this mean. + public IReadOnlyList Prerequisites { get; } + /// The settings of a skillset. + public IReadOnlyList Settings { get; } + /// The settings of a skillset. + public SkillsetAuth Authorization { get; } + /// The types of authentication supported by the skillset. + public IReadOnlyList SupportedAuthTypes { get; } + /// A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available. + public IReadOnlyList UserVisibilityFeatureFlags { get; } + /// Controls the conditions under which the users can see or use this skillset. + public SkillVisibility UserVisibility { get; } + /// Visibility flags required for the planner to user the skillset TODO confirm what this does. + public IReadOnlyList PlannerVisibilityFeatureFlags { get; } + /// Controls the conditions under a prompt can use this skillset. + public SkillVisibility PlannerVisibility { get; } + /// The user ID of the user who created this skillset. + public string CreatorUserId { get; } + /// The ID of an Entra group that contains the owners for this Skillset. + public string OwnersGroupId { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.Serialization.cs new file mode 100644 index 000000000000..f23ae673a364 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SkillsetSetting + { + internal static SkillsetSetting DeserializeSkillsetSetting(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string label = default; + string description = default; + string hintText = default; + SkillsetSettingType settingType = default; + bool required = default; + string defaultValue = default; + string value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("hintText"u8)) + { + hintText = property.Value.GetString(); + continue; + } + if (property.NameEquals("settingType"u8)) + { + settingType = new SkillsetSettingType(property.Value.GetString()); + continue; + } + if (property.NameEquals("required"u8)) + { + required = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultValue"u8)) + { + defaultValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + } + return new SkillsetSetting(name, label, description, hintText, settingType, required, defaultValue, value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SkillsetSetting FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSkillsetSetting(document.RootElement); + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.cs new file mode 100644 index 000000000000..768ff8651a74 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSetting.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Defines the settings of a skillset. + public partial class SkillsetSetting + { + /// Initializes a new instance of SkillsetSetting. + /// The name of the skillset setting. + /// The label of the skillset setting. + /// The description of the skillset setting used to describe the setting to the user in an info text box. + /// The hint text used to fill in the setting box. + /// The type of the skillset setting. + /// Whether the skillset setting is required. + /// The default value of the skillset setting. + /// The value of the skillset setting. + /// , , , , or is null. + internal SkillsetSetting(string name, string label, string description, string hintText, SkillsetSettingType settingType, bool required, string defaultValue, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(hintText, nameof(hintText)); + Argument.AssertNotNull(defaultValue, nameof(defaultValue)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Label = label; + Description = description; + HintText = hintText; + SettingType = settingType; + Required = required; + DefaultValue = defaultValue; + Value = value; + } + + /// The name of the skillset setting. + public string Name { get; } + /// The label of the skillset setting. + public string Label { get; } + /// The description of the skillset setting used to describe the setting to the user in an info text box. + public string Description { get; } + /// The hint text used to fill in the setting box. + public string HintText { get; } + /// The type of the skillset setting. + public SkillsetSettingType SettingType { get; } + /// Whether the skillset setting is required. + public bool Required { get; } + /// The default value of the skillset setting. + public string DefaultValue { get; } + /// The value of the skillset setting. + public string Value { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSettingType.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSettingType.cs new file mode 100644 index 000000000000..a1ad6ac51d18 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SkillsetSettingType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Defines the type of a skillset setting. + public readonly partial struct SkillsetSettingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SkillsetSettingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SecretStringValue = "SecretString"; + private const string StringValue = "String"; + + /// The skillset setting is a secret string TODO what does this mean. + public static SkillsetSettingType SecretString { get; } = new SkillsetSettingType(SecretStringValue); + /// The skillset setting is a string. + public static SkillsetSettingType String { get; } = new SkillsetSettingType(StringValue); + /// Determines if two values are the same. + public static bool operator ==(SkillsetSettingType left, SkillsetSettingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SkillsetSettingType left, SkillsetSettingType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SkillsetSettingType(string value) => new SkillsetSettingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SkillsetSettingType other && Equals(other); + /// + public bool Equals(SkillsetSettingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.Serialization.cs new file mode 100644 index 000000000000..89edcd9ffdb2 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class SuggestedPrompt : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); + writer.WriteEndObject(); + } + + internal static SuggestedPrompt DeserializeSuggestedPrompt(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string prompt = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("prompt"u8)) + { + prompt = property.Value.GetString(); + continue; + } + } + return new SuggestedPrompt(prompt); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static SuggestedPrompt FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeSuggestedPrompt(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.cs new file mode 100644 index 000000000000..92fea66dc1c0 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/SuggestedPrompt.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Suggested prompts providing assistance to users in understanding what prompts work well with CFS. + public partial class SuggestedPrompt + { + /// Initializes a new instance of SuggestedPrompt. + /// Prompt text. + /// is null. + public SuggestedPrompt(string prompt) + { + Argument.AssertNotNull(prompt, nameof(prompt)); + + Prompt = prompt; + } + + /// Prompt text. + public string Prompt { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/TokenCredentialEnum.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/TokenCredentialEnum.cs new file mode 100644 index 000000000000..b4628701e41e --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/TokenCredentialEnum.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Token Credential Types. + public readonly partial struct TokenCredentialEnum : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TokenCredentialEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UserTokenCredentialValue = "UserTokenCredential"; + private const string ServiceTokenCredentialValue = "ServiceTokenCredential"; + + /// None. + public static TokenCredentialEnum None { get; } = new TokenCredentialEnum(NoneValue); + /// UserTokenCredential type. + public static TokenCredentialEnum UserTokenCredential { get; } = new TokenCredentialEnum(UserTokenCredentialValue); + /// ServiceTokenCredential type. + public static TokenCredentialEnum ServiceTokenCredential { get; } = new TokenCredentialEnum(ServiceTokenCredentialValue); + /// Determines if two values are the same. + public static bool operator ==(TokenCredentialEnum left, TokenCredentialEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TokenCredentialEnum left, TokenCredentialEnum right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator TokenCredentialEnum(string value) => new TokenCredentialEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TokenCredentialEnum other && Equals(other); + /// + public bool Equals(TokenCredentialEnum other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.Serialization.cs new file mode 100644 index 000000000000..732cab9bf961 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class ToolCall : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("Type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("Function"u8); + writer.WriteObjectValue(Function); + writer.WriteEndObject(); + } + + internal static ToolCall DeserializeToolCall(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string type = default; + ToolFunctionCall function = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("Type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("Function"u8)) + { + function = ToolFunctionCall.DeserializeToolFunctionCall(property.Value); + continue; + } + } + return new ToolCall(id, type, function); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ToolCall FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeToolCall(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.cs new file mode 100644 index 000000000000..52530d7e4d02 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolCall.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a tool call. + public partial class ToolCall + { + /// Initializes a new instance of ToolCall. + /// The id of the tool call. + /// The type of the tool call. + /// The function for the tool call. + /// , or is null. + public ToolCall(string id, string type, ToolFunctionCall function) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(function, nameof(function)); + + Id = id; + Type = type; + Function = function; + } + + /// The id of the tool call. + public string Id { get; set; } + /// The type of the tool call. + public string Type { get; set; } + /// The function for the tool call. + public ToolFunctionCall Function { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.Serialization.cs new file mode 100644 index 000000000000..42f159729fd0 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class ToolFunctionCall : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("Arguments"u8); + writer.WriteStringValue(Arguments); + writer.WriteEndObject(); + } + + internal static ToolFunctionCall DeserializeToolFunctionCall(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string arguments = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("Name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("Arguments"u8)) + { + arguments = property.Value.GetString(); + continue; + } + } + return new ToolFunctionCall(name, arguments); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ToolFunctionCall FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeToolFunctionCall(document.RootElement); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.cs new file mode 100644 index 000000000000..3bb991460dcc --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/ToolFunctionCall.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a tool function call. + public partial class ToolFunctionCall + { + /// Initializes a new instance of ToolFunctionCall. + /// The name of the tool function. + /// The arguments for the tool function. + /// or is null. + public ToolFunctionCall(string name, string arguments) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(arguments, nameof(arguments)); + + Name = name; + Arguments = arguments; + } + + /// The name of the tool function. + public string Name { get; set; } + /// The arguments for the tool function. + public string Arguments { get; set; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.Serialization.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.Serialization.cs new file mode 100644 index 000000000000..b454e6f40fae --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + public partial class Tools : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("Type"u8); + writer.WriteStringValue(Type); + writer.WritePropertyName("Function"u8); + writer.WriteObjectValue(Function); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.cs new file mode 100644 index 000000000000..79fbe1e2435d --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/Models/Tools.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Models +{ + /// Represents a tool. + public partial class Tools + { + /// Initializes a new instance of Tools. + /// The type of the tool. + /// The function definition for the tool. + /// or is null. + public Tools(string type, FunctionDefinition function) + { + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(function, nameof(function)); + + Type = type; + Function = function; + } + + /// The type of the tool. + public string Type { get; } + /// The function definition for the tool. + public FunctionDefinition Function { get; } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClient.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClient.cs new file mode 100644 index 000000000000..5c3dd36ac8c7 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClient.cs @@ -0,0 +1,2990 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Microsoft.Security.Copilot.SkillsetAuthoring.Models; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring +{ + // Data plane generated client. + /// + /// The Skillset Authoring API exposes endpoints allowing a skill to interact with the current session to perform actions such as accessing previous prompts/responses within the current session, + /// reading the inputs of the skill, invoking other skills, reporting progress of execution, returning results/errors, acquiring tokens to access other resources, and retrieving skill specific settings. It also provides methods to interact with Open + /// AI client to create chat completion and get embeddings. + /// + public partial class SkillContextClient + { + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of SkillContextClient for mocking. + protected SkillContextClient() + { + } + + /// Initializes a new instance of SkillContextClient. + /// + /// Supported Security Copilot API endpoints (protocol and host name, such as + /// https://api.medeina-dev.defender.microsoft.com). + /// + /// is null. + public SkillContextClient(Uri endpoint) : this(endpoint, new SkillContextClientOptions()) + { + } + + /// Initializes a new instance of SkillContextClient. + /// + /// Supported Security Copilot API endpoints (protocol and host name, such as + /// https://api.medeina-dev.defender.microsoft.com). + /// + /// The options for configuring the client. + /// is null. + public SkillContextClient(Uri endpoint, SkillContextClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + options ??= new SkillContextClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), Array.Empty(), new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Get the SkillContext for the current skill invocation. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetSkillContextAsync(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSkillContextAsync(evaluationToken, context).ConfigureAwait(false); + return Response.FromValue(SkillContextResponse.FromResponse(response), response); + } + + /// Get the SkillContext for the current skill invocation. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetSkillContext(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSkillContext(evaluationToken, context); + return Response.FromValue(SkillContextResponse.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the SkillContext for the current skill invocation + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSkillContextAsync(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillContext"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillContextRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the SkillContext for the current skill invocation + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSkillContext(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillContext"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillContextRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Invokes a skill. Allows current skill to invoke dependency skills. + /// The String to use. + /// The InvokeSkillRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> InvokeSkillAsync(string evaluationToken, InvokeSkillRequest invokeSkill, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(invokeSkill, nameof(invokeSkill)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await InvokeSkillAsync(evaluationToken, invokeSkill.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(OutputSkillVariable.FromResponse(response), response); + } + + /// Invokes a skill. Allows current skill to invoke dependency skills. + /// The String to use. + /// The InvokeSkillRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response InvokeSkill(string evaluationToken, InvokeSkillRequest invokeSkill, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(invokeSkill, nameof(invokeSkill)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = InvokeSkill(evaluationToken, invokeSkill.ToRequestContent(), context); + return Response.FromValue(OutputSkillVariable.FromResponse(response), response); + } + + /// + /// [Protocol Method] Invokes a skill. Allows current skill to invoke dependency skills. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task InvokeSkillAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.InvokeSkill"); + scope.Start(); + try + { + using HttpMessage message = CreateInvokeSkillRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Invokes a skill. Allows current skill to invoke dependency skills. + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response InvokeSkill(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.InvokeSkill"); + scope.Start(); + try + { + using HttpMessage message = CreateInvokeSkillRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get skill descriptor. + /// The String to use. + /// The String to use. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetSkillDescriptorAsync(string evaluationToken, string skillName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNullOrEmpty(skillName, nameof(skillName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSkillDescriptorAsync(evaluationToken, skillName, context).ConfigureAwait(false); + return Response.FromValue(SkillDescriptor.FromResponse(response), response); + } + + /// Get skill descriptor. + /// The String to use. + /// The String to use. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetSkillDescriptor(string evaluationToken, string skillName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNullOrEmpty(skillName, nameof(skillName)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSkillDescriptor(evaluationToken, skillName, context); + return Response.FromValue(SkillDescriptor.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get skill descriptor + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSkillDescriptorAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillDescriptor"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillDescriptorRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get skill descriptor + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSkillDescriptor(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillDescriptor"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillDescriptorRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get skill descriptors. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task>> GetSkillDescriptorsAsync(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSkillDescriptorsAsync(evaluationToken, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(SkillDescriptor.DeserializeSkillDescriptor(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// Get skill descriptors. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual Response> GetSkillDescriptors(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSkillDescriptors(evaluationToken, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(SkillDescriptor.DeserializeSkillDescriptor(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get skill descriptors + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSkillDescriptorsAsync(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillDescriptors"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillDescriptorsRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get skill descriptors + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSkillDescriptors(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillDescriptors"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillDescriptorsRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get skillset descriptors. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task>> GetSkillsetDescriptorsAsync(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSkillsetDescriptorsAsync(evaluationToken, context).ConfigureAwait(false); + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(SkillsetDescriptor.DeserializeSkillsetDescriptor(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// Get skillset descriptors. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual Response> GetSkillsetDescriptors(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSkillsetDescriptors(evaluationToken, context); + IReadOnlyList value = default; + using var document = JsonDocument.Parse(response.ContentStream); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(SkillsetDescriptor.DeserializeSkillsetDescriptor(item)); + } + value = array; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Get skillset descriptors + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSkillsetDescriptorsAsync(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillsetDescriptors"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillsetDescriptorsRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get skillset descriptors + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSkillsetDescriptors(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillsetDescriptors"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillsetDescriptorsRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get execution context. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetExecutionContextAsync(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetExecutionContextAsync(evaluationToken, context).ConfigureAwait(false); + return Response.FromValue(MedeinaExecutionContext.FromResponse(response), response); + } + + /// Get execution context. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetExecutionContext(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetExecutionContext(evaluationToken, context); + return Response.FromValue(MedeinaExecutionContext.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get execution context + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetExecutionContextAsync(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetExecutionContext"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExecutionContextRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get execution context + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetExecutionContext(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetExecutionContext"); + scope.Start(); + try + { + using HttpMessage message = CreateGetExecutionContextRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get prompt history. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetPromptHistoryAsync(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetPromptHistoryAsync(evaluationToken, context).ConfigureAwait(false); + return Response.FromValue(PromptHistoryResponse.FromResponse(response), response); + } + + /// Get prompt history. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetPromptHistory(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetPromptHistory(evaluationToken, context); + return Response.FromValue(PromptHistoryResponse.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get prompt history + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetPromptHistoryAsync(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetPromptHistory"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPromptHistoryRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get prompt history + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetPromptHistory(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetPromptHistory"); + scope.Start(); + try + { + using HttpMessage message = CreateGetPromptHistoryRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Log a progress message for a skill invocation. + /// The String to use. + /// The LogProgressRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task LogProgressAsync(string evaluationToken, LogProgressRequest logProgressRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(logProgressRequest, nameof(logProgressRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await LogProgressAsync(evaluationToken, logProgressRequest.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Log a progress message for a skill invocation. + /// The String to use. + /// The LogProgressRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response LogProgress(string evaluationToken, LogProgressRequest logProgressRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(logProgressRequest, nameof(logProgressRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = LogProgress(evaluationToken, logProgressRequest.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Log a progress message for a skill invocation + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task LogProgressAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.LogProgress"); + scope.Start(); + try + { + using HttpMessage message = CreateLogProgressRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Log a progress message for a skill invocation + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response LogProgress(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.LogProgress"); + scope.Start(); + try + { + using HttpMessage message = CreateLogProgressRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Sets the skill output. + /// The String to use. + /// The EvaluationResultOutput to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task SetSkillOutputAsync(string evaluationToken, EvaluationResultOutput evaluationResultOutput, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(evaluationResultOutput, nameof(evaluationResultOutput)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await SetSkillOutputAsync(evaluationToken, evaluationResultOutput.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Sets the skill output. + /// The String to use. + /// The EvaluationResultOutput to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response SetSkillOutput(string evaluationToken, EvaluationResultOutput evaluationResultOutput, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(evaluationResultOutput, nameof(evaluationResultOutput)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = SetSkillOutput(evaluationToken, evaluationResultOutput.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Sets the skill output + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SetSkillOutputAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetSkillOutput"); + scope.Start(); + try + { + using HttpMessage message = CreateSetSkillOutputRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Sets the skill output + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response SetSkillOutput(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetSkillOutput"); + scope.Start(); + try + { + using HttpMessage message = CreateSetSkillOutputRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the skillset settings. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task>> GetSkillsetSettingsAsync(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSkillsetSettingsAsync(evaluationToken, context).ConfigureAwait(false); + IReadOnlyDictionary value = default; + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + Dictionary dictionary = new Dictionary(); + foreach (var property in document.RootElement.EnumerateObject()) + { + dictionary.Add(property.Name, property.Value.GetString()); + } + value = dictionary; + return Response.FromValue(value, response); + } + + /// Gets the skillset settings. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual Response> GetSkillsetSettings(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSkillsetSettings(evaluationToken, context); + IReadOnlyDictionary value = default; + using var document = JsonDocument.Parse(response.ContentStream); + Dictionary dictionary = new Dictionary(); + foreach (var property in document.RootElement.EnumerateObject()) + { + dictionary.Add(property.Name, property.Value.GetString()); + } + value = dictionary; + return Response.FromValue(value, response); + } + + /// + /// [Protocol Method] Gets the skillset settings + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSkillsetSettingsAsync(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillsetSettings"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillsetSettingsRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the skillset settings + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSkillsetSettings(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillsetSettings"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillsetSettingsRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Notifies security copilot backend service that the skill has been invoked + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SetSkillInvocationStartedAsync(string evaluationToken, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetSkillInvocationStarted"); + scope.Start(); + try + { + using HttpMessage message = CreateSetSkillInvocationStartedRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Notifies security copilot backend service that the skill has been invoked + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response SetSkillInvocationStarted(string evaluationToken, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetSkillInvocationStarted"); + scope.Start(); + try + { + using HttpMessage message = CreateSetSkillInvocationStartedRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Notifies security copilot backend service that the skill invocation has completed + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SetSkillInvocationCompletedAsync(string evaluationToken, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetSkillInvocationCompleted"); + scope.Start(); + try + { + using HttpMessage message = CreateSetSkillInvocationCompletedRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Notifies security copilot backend service that the skill invocation has completed + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response SetSkillInvocationCompleted(string evaluationToken, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetSkillInvocationCompleted"); + scope.Start(); + try + { + using HttpMessage message = CreateSetSkillInvocationCompletedRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the skillset auth related information. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> GetSkillsetAuthInfoAsync(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetSkillsetAuthInfoAsync(evaluationToken, context).ConfigureAwait(false); + return Response.FromValue(AuthDetails.FromResponse(response), response); + } + + /// Gets the skillset auth related information. + /// The String to use. + /// The cancellation token to use. + /// is null. + /// + public virtual Response GetSkillsetAuthInfo(string evaluationToken, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetSkillsetAuthInfo(evaluationToken, context); + return Response.FromValue(AuthDetails.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the skillset auth related information + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetSkillsetAuthInfoAsync(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillsetAuthInfo"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillsetAuthInfoRequest(evaluationToken, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the skillset auth related information + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetSkillsetAuthInfo(string evaluationToken, RequestContext context) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetSkillsetAuthInfo"); + scope.Start(); + try + { + using HttpMessage message = CreateGetSkillsetAuthInfoRequest(evaluationToken, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the token credentials. + /// The String to use. + /// The GetTokenCredentialRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> GetTokenCredentialAsync(string evaluationToken, GetTokenCredentialRequest getTokenCredentialRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(getTokenCredentialRequest, nameof(getTokenCredentialRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetTokenCredentialAsync(evaluationToken, getTokenCredentialRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(Models.AccessToken.FromResponse(response), response); + } + + /// Gets the token credentials. + /// The String to use. + /// The GetTokenCredentialRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response GetTokenCredential(string evaluationToken, GetTokenCredentialRequest getTokenCredentialRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(getTokenCredentialRequest, nameof(getTokenCredentialRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetTokenCredential(evaluationToken, getTokenCredentialRequest.ToRequestContent(), context); + return Response.FromValue(Models.AccessToken.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the token credentials + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetTokenCredentialAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetTokenCredential"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTokenCredentialRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the token credentials + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetTokenCredential(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetTokenCredential"); + scope.Start(); + try + { + using HttpMessage message = CreateGetTokenCredentialRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets the skill input. + /// The String to use. + /// The GetInputRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> GetInputAsync(string evaluationToken, GetInputRequest getInputRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(getInputRequest, nameof(getInputRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetInputAsync(evaluationToken, getInputRequest.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(SkillVariable.FromResponse(response), response); + } + + /// Gets the skill input. + /// The String to use. + /// The GetInputRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response GetInput(string evaluationToken, GetInputRequest getInputRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(getInputRequest, nameof(getInputRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetInput(evaluationToken, getInputRequest.ToRequestContent(), context); + return Response.FromValue(SkillVariable.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets the skill input + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetInputAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetInput"); + scope.Start(); + try + { + using HttpMessage message = CreateGetInputRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets the skill input + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetInput(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.GetInput"); + scope.Start(); + try + { + using HttpMessage message = CreateGetInputRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Sets the input for the skill. + /// The String to use. + /// The SetInputRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task SetInputAsync(string evaluationToken, SetInputRequest setInputRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(setInputRequest, nameof(setInputRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await SetInputAsync(evaluationToken, setInputRequest.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Sets the input for the skill. + /// The String to use. + /// The SetInputRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response SetInput(string evaluationToken, SetInputRequest setInputRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(setInputRequest, nameof(setInputRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = SetInput(evaluationToken, setInputRequest.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Sets the input for the skill + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SetInputAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetInput"); + scope.Start(); + try + { + using HttpMessage message = CreateSetInputRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Sets the input for the skill + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response SetInput(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetInput"); + scope.Start(); + try + { + using HttpMessage message = CreateSetInputRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Adds a list of sources to the output. + /// The String to use. + /// The AddSourcesRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task AddSourcesAsync(string evaluationToken, AddSourcesRequest addSourcesRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(addSourcesRequest, nameof(addSourcesRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddSourcesAsync(evaluationToken, addSourcesRequest.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Adds a list of sources to the output. + /// The String to use. + /// The AddSourcesRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response AddSources(string evaluationToken, AddSourcesRequest addSourcesRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(addSourcesRequest, nameof(addSourcesRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddSources(evaluationToken, addSourcesRequest.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Adds a list of sources to the output + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddSourcesAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.AddSources"); + scope.Start(); + try + { + using HttpMessage message = CreateAddSourcesRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Adds a list of sources to the output + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddSources(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.AddSources"); + scope.Start(); + try + { + using HttpMessage message = CreateAddSourcesRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Adds a source to the output. + /// The String to use. + /// The AddSourceRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task AddSourceAsync(string evaluationToken, AddSourceRequest addSourceRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(addSourceRequest, nameof(addSourceRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddSourceAsync(evaluationToken, addSourceRequest.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Adds a source to the output. + /// The String to use. + /// The AddSourceRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response AddSource(string evaluationToken, AddSourceRequest addSourceRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(addSourceRequest, nameof(addSourceRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddSource(evaluationToken, addSourceRequest.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Adds a source to the output + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddSourceAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.AddSource"); + scope.Start(); + try + { + using HttpMessage message = CreateAddSourceRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Adds a source to the output + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddSource(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.AddSource"); + scope.Start(); + try + { + using HttpMessage message = CreateAddSourceRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Adds a list of suggested prompts to the skill context. + /// The String to use. + /// The AddSuggestedPromptsRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task AddSuggestedPromptsAsync(string evaluationToken, AddSuggestedPromptsRequest addSuggestedPromptsRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(addSuggestedPromptsRequest, nameof(addSuggestedPromptsRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await AddSuggestedPromptsAsync(evaluationToken, addSuggestedPromptsRequest.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Adds a list of suggested prompts to the skill context. + /// The String to use. + /// The AddSuggestedPromptsRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response AddSuggestedPrompts(string evaluationToken, AddSuggestedPromptsRequest addSuggestedPromptsRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(addSuggestedPromptsRequest, nameof(addSuggestedPromptsRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = AddSuggestedPrompts(evaluationToken, addSuggestedPromptsRequest.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Adds a list of suggested prompts to the skill context + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task AddSuggestedPromptsAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.AddSuggestedPrompts"); + scope.Start(); + try + { + using HttpMessage message = CreateAddSuggestedPromptsRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Adds a list of suggested prompts to the skill context + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response AddSuggestedPrompts(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.AddSuggestedPrompts"); + scope.Start(); + try + { + using HttpMessage message = CreateAddSuggestedPromptsRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Sets the final response settings. + /// The String to use. + /// The SetFinalResponseSettingsRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task SetFinalResponseSettingsAsync(string evaluationToken, SetFinalResponseSettingsRequest setFinalResponseSettingsRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(setFinalResponseSettingsRequest, nameof(setFinalResponseSettingsRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await SetFinalResponseSettingsAsync(evaluationToken, setFinalResponseSettingsRequest.ToRequestContent(), context).ConfigureAwait(false); + return response; + } + + /// Sets the final response settings. + /// The String to use. + /// The SetFinalResponseSettingsRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response SetFinalResponseSettings(string evaluationToken, SetFinalResponseSettingsRequest setFinalResponseSettingsRequest, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(setFinalResponseSettingsRequest, nameof(setFinalResponseSettingsRequest)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = SetFinalResponseSettings(evaluationToken, setFinalResponseSettingsRequest.ToRequestContent(), context); + return response; + } + + /// + /// [Protocol Method] Sets the final response settings + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task SetFinalResponseSettingsAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetFinalResponseSettings"); + scope.Start(); + try + { + using HttpMessage message = CreateSetFinalResponseSettingsRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Sets the final response settings + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response SetFinalResponseSettings(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.SetFinalResponseSettings"); + scope.Start(); + try + { + using HttpMessage message = CreateSetFinalResponseSettingsRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Executes an Open AI Chat completion request. + /// The String to use. + /// The CreateChatCompletionRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> CreateChatCompletionAsync(string evaluationToken, CreateChatCompletionRequest request, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(request, nameof(request)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateChatCompletionAsync(evaluationToken, request.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(ChatCompletionResponse.FromResponse(response), response); + } + + /// Executes an Open AI Chat completion request. + /// The String to use. + /// The CreateChatCompletionRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response CreateChatCompletion(string evaluationToken, CreateChatCompletionRequest request, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(request, nameof(request)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateChatCompletion(evaluationToken, request.ToRequestContent(), context); + return Response.FromValue(ChatCompletionResponse.FromResponse(response), response); + } + + /// + /// [Protocol Method] Executes an Open AI Chat completion request + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateChatCompletionAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.CreateChatCompletion"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateChatCompletionRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Executes an Open AI Chat completion request + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateChatCompletion(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.CreateChatCompletion"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateChatCompletionRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Executes an Open AI completion request. + /// The String to use. + /// The CreateCompletionRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> CreateCompletionAsync(string evaluationToken, CreateCompletionRequest request, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(request, nameof(request)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateCompletionAsync(evaluationToken, request.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(CompletionResponse.FromResponse(response), response); + } + + /// Executes an Open AI completion request. + /// The String to use. + /// The CreateCompletionRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response CreateCompletion(string evaluationToken, CreateCompletionRequest request, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(request, nameof(request)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateCompletion(evaluationToken, request.ToRequestContent(), context); + return Response.FromValue(CompletionResponse.FromResponse(response), response); + } + + /// + /// [Protocol Method] Executes an Open AI completion request + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateCompletionAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.CreateCompletion"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateCompletionRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Executes an Open AI completion request + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateCompletion(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.CreateCompletion"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateCompletionRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates Embedding for a prompt or message. + /// The String to use. + /// The CreateEmbeddingRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual async Task> CreateEmbeddingAsync(string evaluationToken, CreateEmbeddingRequest request, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(request, nameof(request)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateEmbeddingAsync(evaluationToken, request.ToRequestContent(), context).ConfigureAwait(false); + return Response.FromValue(EmbeddingResponse.FromResponse(response), response); + } + + /// Creates Embedding for a prompt or message. + /// The String to use. + /// The CreateEmbeddingRequest to use. + /// The cancellation token to use. + /// or is null. + /// + public virtual Response CreateEmbedding(string evaluationToken, CreateEmbeddingRequest request, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(request, nameof(request)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateEmbedding(evaluationToken, request.ToRequestContent(), context); + return Response.FromValue(EmbeddingResponse.FromResponse(response), response); + } + + /// + /// [Protocol Method] Creates Embedding for a prompt or message + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateEmbeddingAsync(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.CreateEmbedding"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateEmbeddingRequest(evaluationToken, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates Embedding for a prompt or message + /// + /// + /// + /// 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. + /// + /// + /// + /// + /// The String to use. + /// 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. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateEmbedding(string evaluationToken, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(evaluationToken, nameof(evaluationToken)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("SkillContextClient.CreateEmbedding"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateEmbeddingRequest(evaluationToken, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetSkillContextRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateInvokeSkillRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/invokeSkill", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetSkillDescriptorRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/skillDescriptor", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetSkillDescriptorsRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/skillDescriptors", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSkillsetDescriptorsRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/skillsetDescriptors", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetExecutionContextRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/executionContext", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetPromptHistoryRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/promptHistory", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateLogProgressRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/logProgress", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateSetSkillOutputRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/setOutputAsync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetSkillsetSettingsRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/skillsetSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateSetSkillInvocationStartedRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/setSkillInvocationStarted", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateSetSkillInvocationCompletedRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/setSkillInvocationCompleted", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetSkillsetAuthInfoRequest(string evaluationToken, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/getSkillsetAuthInfoAsync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetTokenCredentialRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/getTokenCredentialAsync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetInputRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200204); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/getInputAsync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateSetInputRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/setInputAsync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddSourcesRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/AddSources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddSourceRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/AddSource", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateAddSuggestedPromptsRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/AddSuggestedPrompts", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateSetFinalResponseSettingsRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/skillContext/SetFinalResponseSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateChatCompletionRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/medeinaOpenAI/createChatCompletion", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateCompletionRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/medeinaOpenAI/createCompletion", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateEmbeddingRequest(string evaluationToken, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/medeinaOpenAI/CreateEmbedding", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("X-MS-SecurityCopilot-EvaluationToken", evaluationToken); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + private static ResponseClassifier _responseClassifier200204; + private static ResponseClassifier ResponseClassifier200204 => _responseClassifier200204 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 204 }); + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClientOptions.cs b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClientOptions.cs new file mode 100644 index 000000000000..e45713a96ca7 --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/SkillContextClientOptions.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 Microsoft.Security.Copilot.SkillsetAuthoring +{ + /// Client options for SkillContextClient. + public partial class SkillContextClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2023_08_01_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2023-08-01-preview". + V2023_08_01_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of SkillContextClientOptions. + public SkillContextClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2023_08_01_Preview => "2023-08-01-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/tspCodeModel.json b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/tspCodeModel.json new file mode 100644 index 000000000000..c50587c6d41b --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Generated/tspCodeModel.json @@ -0,0 +1,7382 @@ +{ + "$id": "1", + "Name": "SkillContext", + "Description": "The Skillset Authoring API exposes endpoints allowing a skill to interact with the current session to perform actions such as accessing previous prompts/responses within the current session, \nreading the inputs of the skill, invoking other skills, reporting progress of execution, returning results/errors, acquiring tokens to access other resources, and retrieving skill specific settings. It also provides methods to interact with Open\nAI client to create chat completion and get embeddings.", + "ApiVersions": [ + "2023-08-01-preview" + ], + "Enums": [ + { + "$id": "2", + "Name": "SkillsetCategory", + "Namespace": "", + "Description": "Defines the category of the data source/API that the skillset interacts with", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "3", + "Name": "Hidden", + "Value": "Hidden", + "Description": "Default value if a category is not specified. The skillset willnot appear in the UI" + }, + { + "$id": "4", + "Name": "Microsoft", + "Value": "Microsoft", + "Description": "The skillset interacts with Microsoft services only" + }, + { + "$id": "5", + "Name": "Other", + "Value": "Other", + "Description": "The skillset interacts with 3rd party service" + }, + { + "$id": "6", + "Name": "Web", + "Value": "Web", + "Description": "The skillset interacts with public facing web services" + }, + { + "$id": "7", + "Name": "Testing", + "Value": "Testing", + "Description": "The skillset is used for testing and debugging purposes" + }, + { + "$id": "8", + "Name": "Plugin", + "Value": "Plugin", + "Description": "THe skillset of of a plugin format, such as ChatGPT or LogicApp plugins" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "9", + "Name": "SkillsetCatalogScope", + "Namespace": "", + "Description": "The scope of a skillset in the skillset catalog", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "10", + "Name": "None", + "Value": "None", + "Description": "No scope specified" + }, + { + "$id": "11", + "Name": "User", + "Value": "User", + "Description": "The skillset is scoped to the calling user" + }, + { + "$id": "12", + "Name": "Workspace", + "Value": "Workspace", + "Description": "The skillset is scoped to the calling user's workspace TODO what does this mean" + }, + { + "$id": "13", + "Name": "Tenant", + "Value": "Tenant", + "Description": "The skillset is scoped to the calling user's tenant" + }, + { + "$id": "14", + "Name": "Global", + "Value": "Global", + "Description": "The skillset is available globally" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "15", + "Name": "SkillsetSettingType", + "Namespace": "", + "Description": "Defines the type of a skillset setting", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "16", + "Name": "SecretString", + "Value": "SecretString", + "Description": "The skillset setting is a secret string TODO what does this mean" + }, + { + "$id": "17", + "Name": "String", + "Value": "String", + "Description": "The skillset setting is a string" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "18", + "Name": "SkillsetAuthType", + "Namespace": "", + "Description": "Defines the authentication types supported by a skillset", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "19", + "Name": "None", + "Value": "None", + "Description": "The skillset supports no authentication" + }, + { + "$id": "20", + "Name": "Basic", + "Value": "Basic", + "Description": "The skillset supports basic authentication TODO what does this mean" + }, + { + "$id": "21", + "Name": "ApiKey", + "Value": "ApiKey", + "Description": "The skillset supports API key authentication TO what does this mean" + }, + { + "$id": "22", + "Name": "OAuthAuthorizationCodeFlow", + "Value": "OAuthAuthorizationCodeFlow", + "Description": "The skillset supports OAuth authorization code flow authentication TODO what does this mean" + }, + { + "$id": "23", + "Name": "OAuthClientCredentialsFlow", + "Value": "OAuthClientCredentialsFlow", + "Description": "The skillset supports OAuth client credentials flow TODO what does this mean" + }, + { + "$id": "24", + "Name": "AAD", + "Value": "AAD", + "Description": "The skillset supports AAD authentication" + }, + { + "$id": "25", + "Name": "ServiceHttp", + "Value": "ServiceHttp", + "Description": "The skillset supports service HTTP authentication TODO what does this mean" + }, + { + "$id": "26", + "Name": "AADDelegated", + "Value": "AADDelegated", + "Description": "The skillset supports AAD delegated authentication TODO what does this mean" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "27", + "Name": "SkillVisibility", + "Namespace": "", + "Description": "Defines the conditions under which the users can see or use a skillset", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "28", + "Name": "Always", + "Value": "Always", + "Description": "Always visible" + }, + { + "$id": "29", + "Name": "Never", + "Value": "Never", + "Description": "Never visible" + }, + { + "$id": "30", + "Name": "IfFeatureFlagEnabled", + "Value": "IfFeatureFlagEnabled", + "Description": "Visible when any of an associated list of feature flags are enabled" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "31", + "Name": "SkillSourceType", + "Namespace": "", + "Description": "The type for a source that was used in generating the output of a skill", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "32", + "Name": "Uri", + "Value": "Uri", + "Description": "Uri" + }, + { + "$id": "33", + "Name": "StringType", + "Value": "StringType", + "Description": "StringType" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "34", + "Name": "SkillOutputType", + "Namespace": "SkillContext", + "Description": "Skill Output type enum. Supports StructuredOutput and Primitive", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "35", + "Name": "Primitive", + "Value": "Primitive", + "Description": "Primitive" + }, + { + "$id": "36", + "Name": "StructuredComponents", + "Value": "StructuredComponents", + "Description": "Structured Components" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "RoundTrip" + }, + { + "$id": "37", + "Name": "EvaluationInvocationType", + "Namespace": "SkillContext", + "Description": "Evaluation Invocation Type", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "38", + "Name": "Manual", + "Value": "Manual", + "Description": "Manual generation" + }, + { + "$id": "39", + "Name": "Automated", + "Value": "Automated", + "Description": "Automated generation" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "40", + "Name": "EvaluationInvocationCategory", + "Namespace": "SkillContext", + "Description": "Evaluation Invocation Category", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "41", + "Name": "UserPrompt", + "Value": "UserPrompt", + "Description": "Generated from a Prompt" + }, + { + "$id": "42", + "Name": "Promptbooks", + "Value": "Promptbooks", + "Description": "Generated from a Promptbook" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "43", + "Name": "SkillPreviewState", + "Namespace": "SkillContext", + "Description": "Used to configure the preview state of a skill.", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "44", + "Name": "GA", + "Value": "GA" + }, + { + "$id": "45", + "Name": "Public", + "Value": "Public" + }, + { + "$id": "46", + "Name": "Private", + "Value": "Private" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "47", + "Name": "ProgressLogLevel", + "Namespace": "", + "Description": "Level for progress logs", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "48", + "Name": "Error", + "Value": "Error", + "Description": "Error log" + }, + { + "$id": "49", + "Name": "Warning", + "Value": "Warning", + "Description": "Warning log" + }, + { + "$id": "50", + "Name": "Information", + "Value": "Information", + "Description": "Information log" + }, + { + "$id": "51", + "Name": "Verbose", + "Value": "Verbose", + "Description": "Verbose log" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Input" + }, + { + "$id": "52", + "Name": "OutputComponentType", + "Namespace": "SkillContext", + "Description": "", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "53", + "Name": "GptOutput", + "Value": "GptOutput" + }, + { + "$id": "54", + "Name": "Text", + "Value": "Text" + }, + { + "$id": "55", + "Name": "Image", + "Value": "Image" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "None" + }, + { + "$id": "56", + "Name": "SkillOutputComponentAction", + "Namespace": "SkillContext", + "Description": "", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "57", + "Name": "None", + "Value": "None" + }, + { + "$id": "58", + "Name": "Summarize", + "Value": "Summarize" + }, + { + "$id": "59", + "Name": "Substitute", + "Value": "Substitute" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Input" + }, + { + "$id": "60", + "Name": "AuthLocationEnum", + "Namespace": "SkillContext", + "Description": "Auth Location", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "61", + "Name": "Header", + "Value": "Header", + "Description": "Using Header" + }, + { + "$id": "62", + "Name": "QueryParams", + "Value": "QueryParams", + "Description": "Using QueryParams" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Output" + }, + { + "$id": "63", + "Name": "TokenCredentialEnum", + "Namespace": "", + "Description": "Token Credential Types", + "EnumValueType": "String", + "AllowedValues": [ + { + "$id": "64", + "Name": "None", + "Value": "None", + "Description": "None" + }, + { + "$id": "65", + "Name": "UserTokenCredential", + "Value": "UserTokenCredential", + "Description": "UserTokenCredential type" + }, + { + "$id": "66", + "Name": "ServiceTokenCredential", + "Value": "ServiceTokenCredential", + "Description": "ServiceTokenCredential type" + } + ], + "IsExtensible": true, + "IsNullable": false, + "Usage": "Input" + } + ], + "Models": [ + { + "$id": "67", + "Name": "SkillContextResponse", + "Namespace": "SkillContext", + "Description": "SkillContext object containing properties of the current session relevant to the invoked skill", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "68", + "Name": "descriptor", + "SerializedName": "descriptor", + "Description": "Skill descriptor containing attributes that describe a skill (i.e. Inputs required to execute the skill)", + "Type": { + "$id": "69", + "Name": "SkillDescriptor", + "Namespace": "", + "Description": "The desciptor of a skill", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "70", + "Name": "skillset", + "SerializedName": "skillset", + "Description": "The skillset descriptor", + "Type": { + "$id": "71", + "Name": "SkillsetDescriptor", + "Namespace": "", + "Description": "Entity representing a Skillset.", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "72", + "Name": "namespace", + "SerializedName": "namespace", + "Description": "Namespace for the skillset", + "Type": { + "$id": "73", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "74", + "Name": "name", + "SerializedName": "name", + "Description": "The name of the Skillset", + "Type": { + "$id": "75", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "76", + "Name": "description", + "SerializedName": "description", + "Description": "The description of the Skillset", + "Type": { + "$id": "77", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "78", + "Name": "descriptionDisplay", + "SerializedName": "descriptionDisplay", + "Description": "The description of the skillset that's displayed TODO postman/dev figure out where this is displayed", + "Type": { + "$id": "79", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "80", + "Name": "disaplyName", + "SerializedName": "disaplyName", + "Description": "The Skillset name that's displayed in the portal", + "Type": { + "$id": "81", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "82", + "Name": "icon", + "SerializedName": "icon", + "Description": "The icon displayed for the skillset in the console", + "Type": { + "$id": "83", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "84", + "Name": "category", + "SerializedName": "category", + "Description": "The category of the Skillset", + "Type": { + "$ref": "2" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "85", + "Name": "catalogScope", + "SerializedName": "catalogScope", + "Description": "CatalogScope of the Skillset", + "Type": { + "$ref": "9" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "86", + "Name": "enabled", + "SerializedName": "enabled", + "Description": "Whether the skillset is enabled TODO how is this different than Hidden", + "Type": { + "$id": "87", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "88", + "Name": "hidden", + "SerializedName": "hidden", + "Description": "Whether the skillset is hidden TODO how is this different than enabled", + "Type": { + "$id": "89", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "90", + "Name": "prerequisites", + "SerializedName": "prerequisites", + "Description": "The prerequisites of a skillset TODO what does this mean", + "Type": { + "$id": "91", + "Name": "Array", + "ElementType": { + "$id": "92", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "93", + "Name": "settings", + "SerializedName": "settings", + "Description": "The settings of a skillset", + "Type": { + "$id": "94", + "Name": "Array", + "ElementType": { + "$id": "95", + "Name": "SkillsetSetting", + "Namespace": "", + "Description": "Defines the settings of a skillset", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "96", + "Name": "name", + "SerializedName": "name", + "Description": "The name of the skillset setting", + "Type": { + "$id": "97", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "98", + "Name": "label", + "SerializedName": "label", + "Description": "The label of the skillset setting", + "Type": { + "$id": "99", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "100", + "Name": "description", + "SerializedName": "description", + "Description": "The description of the skillset setting used to describe the setting to the user in an info text box", + "Type": { + "$id": "101", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "102", + "Name": "hintText", + "SerializedName": "hintText", + "Description": "The hint text used to fill in the setting box", + "Type": { + "$id": "103", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "104", + "Name": "settingType", + "SerializedName": "settingType", + "Description": "The type of the skillset setting", + "Type": { + "$ref": "15" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "105", + "Name": "required", + "SerializedName": "required", + "Description": "Whether the skillset setting is required", + "Type": { + "$id": "106", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "107", + "Name": "defaultValue", + "SerializedName": "defaultValue", + "Description": "The default value of the skillset setting", + "Type": { + "$id": "108", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "109", + "Name": "value", + "SerializedName": "value", + "Description": "The value of the skillset setting", + "Type": { + "$id": "110", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "111", + "Name": "authorization", + "SerializedName": "authorization", + "Description": "The settings of a skillset", + "Type": { + "$id": "112", + "Name": "SkillsetAuth", + "Namespace": "", + "Description": "The authorization settings for the skillset", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "113", + "Name": "type", + "SerializedName": "type", + "Description": "SkillsetAuth Type", + "Type": { + "$ref": "18" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "114", + "Name": "supportedAuthTypes", + "SerializedName": "supportedAuthTypes", + "Description": "The types of authentication supported by the skillset", + "Type": { + "$id": "115", + "Name": "Array", + "ElementType": { + "$ref": "18" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "116", + "Name": "userVisibilityFeatureFlags", + "SerializedName": "userVisibilityFeatureFlags", + "Description": "A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available", + "Type": { + "$id": "117", + "Name": "Array", + "ElementType": { + "$id": "118", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "119", + "Name": "userVisibility", + "SerializedName": "userVisibility", + "Description": "Controls the conditions under which the users can see or use this skillset", + "Type": { + "$ref": "27" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "120", + "Name": "plannerVisibilityFeatureFlags", + "SerializedName": "plannerVisibilityFeatureFlags", + "Description": "Visibility flags required for the planner to user the skillset TODO confirm what this does", + "Type": { + "$id": "121", + "Name": "Array", + "ElementType": { + "$id": "122", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "123", + "Name": "plannerVisibility", + "SerializedName": "plannerVisibility", + "Description": "Controls the conditions under a prompt can use this skillset", + "Type": { + "$ref": "27" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "124", + "Name": "creatorUserId", + "SerializedName": "creatorUserId", + "Description": "The user ID of the user who created this skillset.", + "Type": { + "$id": "125", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "126", + "Name": "ownersGroupId", + "SerializedName": "ownersGroupId", + "Description": "The ID of an Entra group that contains the owners for this Skillset", + "Type": { + "$id": "127", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "128", + "Name": "name", + "SerializedName": "name", + "Description": "The name of the skill", + "Type": { + "$id": "129", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "130", + "Name": "format", + "SerializedName": "format", + "Description": "The format of the skill", + "Type": { + "$id": "131", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "132", + "Name": "displayName", + "SerializedName": "displayName", + "Description": "The display name of the skill", + "Type": { + "$id": "133", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "134", + "Name": "altName", + "SerializedName": "altName", + "Description": "An alternative name for the skill as some planners follow different naming convensions. This is set by the planner to map the name back to the skill", + "Type": { + "$id": "135", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "136", + "Name": "dependencies", + "SerializedName": "dependencies", + "Description": "The dependencies of the skill", + "Type": { + "$id": "137", + "Name": "Array", + "ElementType": { + "$id": "138", + "Name": "SkillDependencyDescriptor", + "Namespace": "", + "Description": "The descriptor of a skill dependency", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "139", + "Name": "skillsetName", + "SerializedName": "skillsetName", + "Description": "The skillset name", + "Type": { + "$id": "140", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "141", + "Name": "skillName", + "SerializedName": "skillName", + "Description": "The name of the skill", + "Type": { + "$id": "142", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "143", + "Name": "description", + "SerializedName": "description", + "Description": "The description of the skill", + "Type": { + "$id": "144", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "145", + "Name": "examplePrompts", + "SerializedName": "examplePrompts", + "Description": "A list of example prompts for the skill", + "Type": { + "$id": "146", + "Name": "Array", + "ElementType": { + "$id": "147", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "148", + "Name": "hidden", + "SerializedName": "hidden", + "Description": "Whether the skill is hidden TODO what does this mean", + "Type": { + "$id": "149", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "150", + "Name": "inputs", + "SerializedName": "inputs", + "Description": "The inputs required for the skill", + "Type": { + "$id": "151", + "Name": "Array", + "ElementType": { + "$id": "152", + "Name": "SkillInputDescriptor", + "Namespace": "", + "Description": "The descriptor of a skill input", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "153", + "Name": "name", + "SerializedName": "name", + "Description": "The name of the skill input", + "Type": { + "$id": "154", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "155", + "Name": "type", + "SerializedName": "type", + "Description": "The type of the skill input", + "Type": { + "$id": "156", + "Name": "SkillTypeDescriptor", + "Namespace": "", + "Description": "The descriptor of a skill type", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "157", + "Name": "name", + "SerializedName": "name", + "Description": "The name of the skill type", + "Type": { + "$id": "158", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "159", + "Name": "description", + "SerializedName": "description", + "Description": "The description of the skill", + "Type": { + "$id": "160", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "161", + "Name": "required", + "SerializedName": "required", + "Description": "Whether a skill input is required", + "Type": { + "$id": "162", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "163", + "Name": "defaultValue", + "SerializedName": "defaultValue", + "Description": "The default value of the skill input", + "Type": { + "$id": "164", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "165", + "Name": "placeholderValue", + "SerializedName": "placeholderValue", + "Description": "The placeholder value of the skill input TODO how is this different than the default", + "Type": { + "$id": "166", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "167", + "Name": "enum", + "SerializedName": "enum", + "Description": "Enum", + "Type": { + "$id": "168", + "Name": "Array", + "ElementType": { + "$id": "169", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "170", + "Name": "outputs", + "SerializedName": "outputs", + "Description": "The outputs of the skill", + "Type": { + "$id": "171", + "Name": "Array", + "ElementType": { + "$id": "172", + "Name": "SkillOutputDescriptor", + "Namespace": "", + "Description": "The descriptor of a skill output", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "173", + "Name": "name", + "SerializedName": "name", + "Description": "The name of the skill input", + "Type": { + "$id": "174", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "175", + "Name": "type", + "SerializedName": "type", + "Description": "The type of the skill input", + "Type": { + "$ref": "156" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "176", + "Name": "description", + "SerializedName": "description", + "Description": "The description of the skill", + "Type": { + "$id": "177", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "178", + "Name": "promptAlignedName", + "SerializedName": "promptAlignedName", + "Description": "The prompt aligned name of the skill TODO what does this mean", + "Type": { + "$id": "179", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "180", + "Name": "userVisibilityFeatureFlags", + "SerializedName": "userVisibilityFeatureFlags", + "Description": "A list of feature flags. At least one of the feature flags is required to enabled in the prompt context in order for the skillset to be available", + "Type": { + "$id": "181", + "Name": "Array", + "ElementType": { + "$id": "182", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "183", + "Name": "userVisibility", + "SerializedName": "userVisibility", + "Description": "Controls the conditions under which the users can see or use this skillset", + "Type": { + "$ref": "27" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "184", + "Name": "plannerVisibilityFeatureFlags", + "SerializedName": "plannerVisibilityFeatureFlags", + "Description": "Visibility flags required for the planner to user the skillset TODO confirm what this does", + "Type": { + "$id": "185", + "Name": "Array", + "ElementType": { + "$id": "186", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "187", + "Name": "plannerVisibility", + "SerializedName": "plannerVisibility", + "Description": "Controls the conditions under a prompt can use this skillset", + "Type": { + "$ref": "27" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "188", + "Name": "settings", + "SerializedName": "settings", + "Description": "The settings of the skill", + "Type": { + "$id": "189", + "Name": "Dictionary", + "KeyType": { + "$id": "190", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "191", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "192", + "Name": "skillSummaryMetadata", + "SerializedName": "skillSummaryMetadata", + "Description": "skillSummaryMetadata", + "Type": { + "$id": "193", + "Name": "SkillSummaryDescriptor", + "Namespace": "", + "Description": "SkillSummaryDescriptor", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "194", + "Name": "summaryStartMessage", + "SerializedName": "summaryStartMessage", + "Description": "SummaryStartMessage", + "Type": { + "$id": "195", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "196", + "Name": "summaryEndMessage", + "SerializedName": "summaryEndMessage", + "Description": "SummaryEndMessage", + "Type": { + "$id": "197", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "198", + "Name": "enableVariableSubstitutionInCompose", + "SerializedName": "enableVariableSubstitutionInCompose", + "Description": "EnableVariableSubstitutionInCompose", + "Type": { + "$id": "199", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "200", + "Name": "id", + "SerializedName": "id", + "Description": "SkillContext Id", + "Type": { + "$id": "201", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "202", + "Name": "featureFlags", + "SerializedName": "featureFlags", + "Description": "Array of feature flags", + "Type": { + "$id": "203", + "Name": "Array", + "ElementType": { + "$id": "204", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "205", + "Name": "inputs", + "SerializedName": "inputs", + "Description": "Skill Variable Collection", + "Type": { + "$id": "206", + "Name": "Dictionary", + "KeyType": { + "$id": "207", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "208", + "Name": "SkillVariable", + "Namespace": "SkillContext", + "Description": "Skill Variable", + "IsNullable": true, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "209", + "Name": "type", + "SerializedName": "type", + "Description": "Skill variable type", + "Type": { + "$id": "210", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "211", + "Name": "value", + "SerializedName": "value", + "Description": "Skill variable value", + "Type": { + "$id": "212", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "213", + "Name": "valueStoredAsJson", + "SerializedName": "valueStoredAsJson", + "Description": "Skill variable value is stored as json document", + "Type": { + "$id": "214", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ], + "DerivedModels": [ + { + "$id": "215", + "Name": "OutputSkillVariable", + "Namespace": "SkillContext", + "Description": "Skill variable parent entity adding additional attribute 'skillsource' to provide visibility to users as to what data/information was used in generating the output of a skill", + "IsNullable": false, + "BaseModel": { + "$ref": "208" + }, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "216", + "Name": "sources", + "SerializedName": "sources", + "Description": "Array of cited sources that were fetched by a skill and that impacted the output of the skill evaluation", + "Type": { + "$id": "217", + "Name": "Array", + "ElementType": { + "$id": "218", + "Name": "SkillSource", + "Namespace": "SkillContext", + "Description": "Source that is fetched during the evaluation of a skill. Provides visibility to users as to what data/information was used in generating the output of a skill", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "219", + "Name": "displayName", + "SerializedName": "displayName", + "Description": "User friendly name for the information source", + "Type": { + "$id": "220", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "221", + "Name": "sourceContent", + "SerializedName": "sourceContent", + "Description": "Information source content (i.e. URL to article)", + "Type": { + "$id": "222", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "223", + "Name": "sourceType", + "SerializedName": "sourceType", + "Description": "The source type (i.e. URI)", + "Type": { + "$ref": "31" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "224", + "Name": "sourceSerializedData", + "SerializedName": "sourceSerializedData", + "Description": "Source data serialized as string", + "Type": { + "$id": "225", + "Name": "string", + "Kind": "String", + "IsNullable": true + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "226", + "Name": "suggestedPrompts", + "SerializedName": "suggestedPrompts", + "Description": "Suggested prompts providing assistance to users in understanding what prompts work well with CFS", + "Type": { + "$id": "227", + "Name": "Array", + "ElementType": { + "$id": "228", + "Name": "SuggestedPrompt", + "Namespace": "SkillContext", + "Description": "Suggested prompts providing assistance to users in understanding what prompts work well with CFS", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "229", + "Name": "prompt", + "SerializedName": "prompt", + "Description": "Prompt text", + "Type": { + "$id": "230", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "231", + "Name": "skillName", + "SerializedName": "skillName", + "Description": "Skill name", + "Type": { + "$id": "232", + "Name": "string", + "Kind": "String", + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "233", + "Name": "skillInputs", + "SerializedName": "skillInputs", + "Description": "Skill inputs that were used in generating the output of the skill evaluation", + "Type": { + "$id": "234", + "Name": "Dictionary", + "KeyType": { + "$id": "235", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "236", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "237", + "Name": "outputLanguage", + "SerializedName": "outputLanguage", + "Description": "Skill output language", + "Type": { + "$id": "238", + "Name": "string", + "Kind": "String", + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "239", + "Name": "outputType", + "SerializedName": "outputType", + "Description": "Enum indicating the output type of the skill. Supports StructuredOutput and Primitive", + "Type": { + "$ref": "34" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "240", + "Name": "properties", + "SerializedName": "properties", + "Description": "Additional skill specific settings", + "Type": { + "$id": "241", + "Name": "Dictionary", + "KeyType": { + "$id": "242", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "243", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "244", + "Name": "startTime", + "SerializedName": "startTime", + "Description": "TODO", + "Type": { + "$id": "245", + "Name": "utcDateTime", + "Kind": "DateTime", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "246", + "Name": "tenantId", + "SerializedName": "tenantId", + "Description": "Tenant id of tenant in which skill invocation occured", + "Type": { + "$id": "247", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "248", + "Name": "userId", + "SerializedName": "userId", + "Description": "User id of user that invoked the skill", + "Type": { + "$id": "249", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "250", + "Name": "sessionId", + "SerializedName": "sessionId", + "Description": "Current session ID", + "Type": { + "$id": "251", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "252", + "Name": "promptId", + "SerializedName": "promptId", + "Description": "Current prompt ID", + "Type": { + "$id": "253", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "254", + "Name": "evaluationId", + "SerializedName": "evaluationId", + "Description": "Current evaluation ID", + "Type": { + "$id": "255", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "256", + "Name": "complianceFlags", + "SerializedName": "complianceFlags", + "Description": "Compliance flags for logging.", + "Type": { + "$id": "257", + "Name": "ComplianceFlags", + "Namespace": "SkillContext", + "Description": "ComplianceFlags", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "258", + "Name": "recordLog", + "SerializedName": "recordLog", + "Description": "Whether to record logs in Geneva and Kusto for this user", + "Type": { + "$id": "259", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "260", + "Name": "customerOptedInToEyesOnProductImprovement", + "SerializedName": "customerOptedInToEyesOnProductImprovement", + "Description": "Locked down tables not required and non-customer content table does not have to be redacted", + "Type": { + "$id": "261", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "262", + "Name": "customerOptedInToModelImprovement", + "SerializedName": "customerOptedInToModelImprovement", + "Description": "When this is true, the data may be used for model improvement. This flag does not affect redaction.", + "Type": { + "$id": "263", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "264", + "Name": "workspaceId", + "SerializedName": "workspaceId", + "Description": "Fidelis Workspace Id", + "Type": { + "$id": "265", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "266", + "Name": "source", + "SerializedName": "source", + "Description": "Originating source tag for the evaluation (i.e. Immersive, Logic Apps, etc.)", + "Type": { + "$id": "267", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "268", + "Name": "invocationType", + "SerializedName": "invocationType", + "Description": "Indicates whether the evaluation is user driven or automated", + "Type": { + "$ref": "37" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "269", + "Name": "invocationCategory", + "SerializedName": "invocationCategory", + "Description": "Indicates whether the evaluation is from a Prompt or a Promptbook", + "Type": { + "$ref": "40" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "270", + "Name": "userName", + "SerializedName": "userName", + "Description": "Username of the user that invoked the skill", + "Type": { + "$id": "271", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$ref": "69" + }, + { + "$ref": "71" + }, + { + "$ref": "95" + }, + { + "$ref": "112" + }, + { + "$ref": "138" + }, + { + "$ref": "152" + }, + { + "$ref": "156" + }, + { + "$ref": "172" + }, + { + "$ref": "193" + }, + { + "$ref": "208" + }, + { + "$ref": "215" + }, + { + "$ref": "218" + }, + { + "$ref": "228" + }, + { + "$ref": "257" + }, + { + "$id": "272", + "Name": "InvokeSkillRequest", + "Namespace": "SkillContext", + "Description": "Invoke skill request including necessary inputs for invoking a skill", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "273", + "Name": "skillsetName", + "SerializedName": "skillsetName", + "Description": "Name of skillset in which desired skill to invoke resides", + "Type": { + "$id": "274", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "275", + "Name": "skillName", + "SerializedName": "skillName", + "Description": "Name of skill to be invoked", + "Type": { + "$id": "276", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "277", + "Name": "inputs", + "SerializedName": "inputs", + "Description": "Skill inputs", + "Type": { + "$id": "278", + "Name": "Dictionary", + "KeyType": { + "$id": "279", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$ref": "208" + }, + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "280", + "Name": "MedeinaExecutionContext", + "Namespace": "SkillContext", + "Description": "Represents the execution context for the current session.", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "281", + "Name": "SessionId", + "SerializedName": "SessionId", + "Description": "The session id.", + "Type": { + "$id": "282", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "283", + "Name": "PromptId", + "SerializedName": "PromptId", + "Description": "The prompt id.", + "Type": { + "$id": "284", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "285", + "Name": "EvaluationId", + "SerializedName": "EvaluationId", + "Description": "The evaluation id.", + "Type": { + "$id": "286", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "287", + "Name": "TenantId", + "SerializedName": "TenantId", + "Description": "The tenant id.", + "Type": { + "$id": "288", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "289", + "Name": "AccountId", + "SerializedName": "AccountId", + "Description": "The account id.", + "Type": { + "$id": "290", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "291", + "Name": "WorkspaceId", + "SerializedName": "WorkspaceId", + "Description": "The workspace id.", + "Type": { + "$id": "292", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "293", + "Name": "UserName", + "SerializedName": "UserName", + "Description": "The display name of the user.", + "Type": { + "$id": "294", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "295", + "Name": "ApplicationId", + "SerializedName": "ApplicationId", + "Description": "The Application Id that created the Session.", + "Type": { + "$id": "296", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "297", + "Name": "Source", + "SerializedName": "Source", + "Description": "The Source tag i.e. 'immersive'.", + "Type": { + "$id": "298", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "299", + "Name": "UnauthenticatedSourceApplicationId", + "SerializedName": "UnauthenticatedSourceApplicationId", + "Description": "The source application ID.", + "Type": { + "$id": "300", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "301", + "Name": "SelectedSkills", + "SerializedName": "SelectedSkills", + "Description": "The selected skills.", + "Type": { + "$id": "302", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "303", + "Name": "SelectedSkillsets", + "SerializedName": "SelectedSkillsets", + "Description": "The skillsets identified for execution during the evaluation process post skill selection.", + "Type": { + "$id": "304", + "Name": "Array", + "ElementType": { + "$id": "305", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "306", + "Name": "IsFidelisUser", + "SerializedName": "IsFidelisUser", + "Description": "Indicates whether the context is for a user onboarded to Fidelis.", + "Type": { + "$id": "307", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "308", + "Name": "InvocationType", + "SerializedName": "InvocationType", + "Description": "Indicates whether the evaluation is manually generated or user driven.", + "Type": { + "$ref": "37" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "309", + "Name": "InvocationCategory", + "SerializedName": "InvocationCategory", + "Description": "Indicates whether the evaluation is from a Prompt or a Promptbook", + "Type": { + "$ref": "40" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "310", + "Name": "EncryptedUserAccessToken", + "SerializedName": "EncryptedUserAccessToken", + "Description": "The encrypted token used to authenticate the user.", + "Type": { + "$id": "311", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "312", + "Name": "ComplianceFlags", + "SerializedName": "ComplianceFlags", + "Description": "Compliance flags for logging.", + "Type": { + "$ref": "257" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "313", + "Name": "AzureOpenAIExecutionContext", + "SerializedName": "AzureOpenAIExecutionContext", + "Description": "Contains the context for the Azure OpenAI requests such as the deployment id.", + "Type": { + "$id": "314", + "Name": "AzureOpenAIExecutionContext", + "Namespace": "SkillContext", + "Description": "Represents the Azure OpenAI execution context.", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "315", + "Name": "ApiVersion", + "SerializedName": "ApiVersion", + "Description": "The API version.", + "Type": { + "$id": "316", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "317", + "Name": "Environment", + "SerializedName": "Environment", + "Description": "The environment where the request is being made.", + "Type": { + "$id": "318", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "319", + "Name": "IsGPUProxyEnabled", + "SerializedName": "IsGPUProxyEnabled", + "Description": "Determines if the GPU proxy is enabled.", + "Type": { + "$id": "320", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "321", + "Name": "GpuProcessingGeo", + "SerializedName": "GpuProcessingGeo", + "Description": "The geographic location where the GPU processing is being done.", + "Type": { + "$id": "322", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "323", + "Name": "CustomerAllowCrossGeoCompute", + "SerializedName": "CustomerAllowCrossGeoCompute", + "Description": "Whether the customer allows cross-geo compute in their workspace capacity.", + "Type": { + "$id": "324", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "325", + "Name": "EcsAllowCrossGeoCompute", + "SerializedName": "EcsAllowCrossGeoCompute", + "Description": "ECS controlled flag to allow cross-geo compute.", + "Type": { + "$id": "326", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "327", + "Name": "ContentFilterProperties", + "SerializedName": "ContentFilterProperties", + "Description": "Properties used to add content prompt and content filter details from the response.", + "Type": { + "$id": "328", + "Name": "Dictionary", + "KeyType": { + "$id": "329", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "330", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "331", + "Name": "ReportingProperties", + "SerializedName": "ReportingProperties", + "Description": "Properties used to report information about the skill invocation. Must not contain customer content.", + "Type": { + "$id": "332", + "Name": "Dictionary", + "KeyType": { + "$id": "333", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "334", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "335", + "Name": "PreviewState", + "SerializedName": "PreviewState", + "Description": "Preview state of the execution context.", + "Type": { + "$ref": "43" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$ref": "314" + }, + { + "$id": "336", + "Name": "PromptHistoryResponse", + "Namespace": "SkillContext", + "Description": "The prompt history of the current session", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "337", + "Name": "prompts", + "SerializedName": "prompts", + "Description": "List of prompts that have been evaluated in the current session", + "Type": { + "$id": "338", + "Name": "Array", + "ElementType": { + "$id": "339", + "Name": "SessionPrompt", + "Namespace": "SkillContext", + "Description": "A record for a prompt and response used in tracking session prompt history", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "340", + "Name": "prompt", + "SerializedName": "prompt", + "Description": "The content of the prompt", + "Type": { + "$id": "341", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "342", + "Name": "response", + "SerializedName": "response", + "Description": "Prompt response returned by the prompt evaluation", + "Type": { + "$id": "343", + "Name": "string", + "Kind": "String", + "IsNullable": true + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$ref": "339" + }, + { + "$id": "344", + "Name": "LogProgressRequest", + "Namespace": "SkillContext", + "Description": "The progress message to log during a skill invocation", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "345", + "Name": "level", + "SerializedName": "level", + "Description": "Log level", + "Type": { + "$ref": "47" + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "346", + "Name": "message", + "SerializedName": "message", + "Description": "Log message", + "Type": { + "$id": "347", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "348", + "Name": "EvaluationResultOutput", + "Namespace": "SkillContext", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "349", + "Name": "skillOutputType", + "SerializedName": "skillOutputType", + "Description": "", + "Type": { + "$ref": "34" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "350", + "Name": "primitiveOutput", + "SerializedName": "primitiveOutput", + "Description": "", + "Type": { + "$ref": "215" + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "351", + "Name": "structuredOutput", + "SerializedName": "structuredOutput", + "Description": "", + "Type": { + "$id": "352", + "Name": "SkillStructuredOutput", + "Namespace": "SkillContext", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "353", + "Name": "components", + "SerializedName": "components", + "Description": "", + "Type": { + "$id": "354", + "Name": "Array", + "ElementType": { + "$id": "355", + "Name": "SkillOutputComponent", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$id": "356", + "Name": "OutputComponent", + "Namespace": "SkillContext", + "IsNullable": false, + "Usage": "None", + "Properties": [ + { + "$id": "357", + "Name": "name", + "SerializedName": "name", + "Description": "", + "Type": { + "$id": "358", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "359", + "Name": "content", + "SerializedName": "content", + "Description": "", + "Type": { + "$id": "360", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "361", + "Name": "description", + "SerializedName": "description", + "Description": "", + "Type": { + "$id": "362", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "363", + "Name": "type", + "SerializedName": "type", + "Description": "", + "Type": { + "$ref": "52" + }, + "IsRequired": true, + "IsReadOnly": false + } + ], + "DerivedModels": [ + { + "$id": "364", + "Name": "SkillOutputComponent", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$ref": "356" + }, + "Usage": "None", + "Properties": [ + { + "$id": "365", + "Name": "action", + "SerializedName": "action", + "Description": "", + "Type": { + "$ref": "56" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "366", + "Name": "includeInEvalResultAsRawComponent", + "SerializedName": "includeInEvalResultAsRawComponent", + "Description": "", + "Type": { + "$id": "367", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + } + ] + }, + "Usage": "Input", + "Properties": [ + { + "$id": "368", + "Name": "action", + "SerializedName": "action", + "Description": "", + "Type": { + "$ref": "56" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "369", + "Name": "includeInEvalResultAsRawComponent", + "SerializedName": "includeInEvalResultAsRawComponent", + "Description": "", + "Type": { + "$id": "370", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "371", + "Name": "primitiveOutputValue", + "SerializedName": "primitiveOutputValue", + "Description": "", + "Type": { + "$id": "372", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$ref": "352" + }, + { + "$ref": "356" + }, + { + "$ref": "355" + }, + { + "$id": "373", + "Name": "AuthDetails", + "Namespace": "SkillContext", + "Description": "Auth Details", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "374", + "Name": "authLocation", + "SerializedName": "authLocation", + "Description": "Auth Location", + "Type": { + "$ref": "60" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "375", + "Name": "authInfo", + "SerializedName": "authInfo", + "Description": "Auth Info", + "Type": { + "$id": "376", + "Name": "Dictionary", + "KeyType": { + "$id": "377", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "378", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "379", + "Name": "GetTokenCredentialRequest", + "Namespace": "SkillContext", + "Description": "TokenCredentialRequest", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "380", + "Name": "scopes", + "SerializedName": "scopes", + "Description": "Scopes", + "Type": { + "$id": "381", + "Name": "Array", + "ElementType": { + "$id": "382", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "383", + "Name": "tokenCredentialType", + "SerializedName": "tokenCredentialType", + "Description": "TokenCredential Type", + "Type": { + "$ref": "63" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "384", + "Name": "tenantId", + "SerializedName": "tenantId", + "Description": "TenantId", + "Type": { + "$id": "385", + "Name": "string", + "Kind": "String", + "IsNullable": true + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$id": "386", + "Name": "AccessToken", + "Namespace": "SkillContext", + "Description": "AccessToken", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "387", + "Name": "token", + "SerializedName": "token", + "Description": "Token string", + "Type": { + "$id": "388", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "389", + "Name": "expiresOn", + "SerializedName": "expiresOn", + "Description": "Expiry time", + "Type": { + "$id": "390", + "Name": "offsetDateTime", + "Kind": "DateTime", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "391", + "Name": "GetInputRequest", + "Namespace": "SkillContext", + "Description": "GetInputRequest", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "392", + "Name": "inputName", + "SerializedName": "inputName", + "Description": "Input Name", + "Type": { + "$id": "393", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "394", + "Name": "defaultValue", + "SerializedName": "defaultValue", + "Description": "Default value for the input", + "Type": { + "$ref": "208" + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$id": "395", + "Name": "SetInputRequest", + "Namespace": "SkillContext", + "Description": "SetInputRequest", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "396", + "Name": "inputName", + "SerializedName": "inputName", + "Description": "Input Name", + "Type": { + "$id": "397", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "398", + "Name": "defaultValue", + "SerializedName": "defaultValue", + "Description": "Default value for the input", + "Type": { + "$ref": "208" + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$id": "399", + "Name": "AddSourcesRequest", + "Namespace": "SkillContext", + "Description": "AddSourcesRequest", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "400", + "Name": "sources", + "SerializedName": "sources", + "Description": "List of SkillSource", + "Type": { + "$id": "401", + "Name": "Array", + "ElementType": { + "$ref": "218" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "402", + "Name": "AddSourceRequest", + "Namespace": "SkillContext", + "Description": "AddSourceRequest", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "403", + "Name": "SkillSource", + "SerializedName": "SkillSource", + "Description": "SkillSource", + "Type": { + "$ref": "218" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "404", + "Name": "AddSuggestedPromptsRequest", + "Namespace": "SkillContext", + "Description": "AddSuggestedPromptsRequest", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "405", + "Name": "suggestedPrompts", + "SerializedName": "suggestedPrompts", + "Description": "List of SuggestedPrompt", + "Type": { + "$id": "406", + "Name": "Array", + "ElementType": { + "$ref": "228" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "407", + "Name": "SetFinalResponseSettingsRequest", + "Namespace": "SkillContext", + "Description": "SetFinalResponseSettingsRequest", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "408", + "Name": "finalResponseBehavior", + "SerializedName": "finalResponseBehavior", + "Description": "FinalResponseBehavior", + "Type": { + "$id": "409", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "410", + "Name": "finalResponseFormat", + "SerializedName": "finalResponseFormat", + "Description": "FinalResponseFormat", + "Type": { + "$id": "411", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "412", + "Name": "finalResponsePersona", + "SerializedName": "finalResponsePersona", + "Description": "FinalResponsePersona", + "Type": { + "$id": "413", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "414", + "Name": "finalResponseFallback", + "SerializedName": "finalResponseFallback", + "Description": "FinalResponseFallback", + "Type": { + "$id": "415", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$id": "416", + "Name": "CreateChatCompletionRequest", + "Namespace": "SkillContext", + "Description": "Represents a request to create a chat completion.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "417", + "Name": "deploymentId", + "SerializedName": "deploymentId", + "Description": "The deployment ID.", + "Type": { + "$id": "418", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "419", + "Name": "chatCompletionRequest", + "SerializedName": "chatCompletionRequest", + "Description": "The chat completion request details.", + "Type": { + "$id": "420", + "Name": "ChatCompletionRequest", + "Namespace": "SkillContext", + "Description": "Represents a chat completion request.", + "IsNullable": false, + "BaseModel": { + "$id": "421", + "Name": "BaseCompletionRequest", + "Namespace": "SkillContext", + "Description": "Represents the base completion request with common parameters.", + "IsNullable": false, + "Usage": "None", + "Properties": [ + { + "$id": "422", + "Name": "MaxTokens", + "SerializedName": "MaxTokens", + "Description": "The maximum number of tokens to generate.", + "Type": { + "$id": "423", + "Name": "int32", + "Kind": "Int32", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "424", + "Name": "Temperature", + "SerializedName": "Temperature", + "Description": "The sampling temperature to use.", + "Type": { + "$id": "425", + "Name": "float64", + "Kind": "Float64", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "426", + "Name": "TopP", + "SerializedName": "TopP", + "Description": "The nucleus sampling parameter.", + "Type": { + "$id": "427", + "Name": "float64", + "Kind": "Float64", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "428", + "Name": "N", + "SerializedName": "N", + "Description": "The number of completions to generate.", + "Type": { + "$id": "429", + "Name": "int32", + "Kind": "Int32", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "430", + "Name": "Stream", + "SerializedName": "Stream", + "Description": "Specifies whether to stream the response.", + "Type": { + "$id": "431", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "432", + "Name": "Logprobs", + "SerializedName": "Logprobs", + "Description": "The number of log probabilities to include.", + "Type": { + "$id": "433", + "Name": "int32", + "Kind": "Int32", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "434", + "Name": "Echo", + "SerializedName": "Echo", + "Description": "Whether to include the prompt in the output.", + "Type": { + "$id": "435", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "436", + "Name": "Stop", + "SerializedName": "Stop", + "Description": "Stop sequences to terminate generation.", + "Type": { + "$id": "437", + "Name": "Array", + "ElementType": { + "$id": "438", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "439", + "Name": "PresencePenalty", + "SerializedName": "PresencePenalty", + "Description": "The penalty for repeating words in the presence.", + "Type": { + "$id": "440", + "Name": "float64", + "Kind": "Float64", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "441", + "Name": "FrequencyPenalty", + "SerializedName": "FrequencyPenalty", + "Description": "The penalty for repeating tokens.", + "Type": { + "$id": "442", + "Name": "float64", + "Kind": "Float64", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "443", + "Name": "BestOf", + "SerializedName": "BestOf", + "Description": "The number of completions to choose the best from.", + "Type": { + "$id": "444", + "Name": "int32", + "Kind": "Int32", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "445", + "Name": "LogitBias", + "SerializedName": "LogitBias", + "Description": "Adjusts likelihood of specific tokens.", + "Type": { + "$id": "446", + "Name": "Dictionary", + "KeyType": { + "$id": "447", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "448", + "Name": "int32", + "Kind": "Int32", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "449", + "Name": "ResponseFormat", + "SerializedName": "ResponseFormat", + "Description": "The response format specification.", + "Type": { + "$id": "450", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ], + "DerivedModels": [ + { + "$id": "451", + "Name": "ChatCompletionRequest", + "Namespace": "SkillContext", + "Description": "Represents a chat completion request.", + "IsNullable": false, + "BaseModel": { + "$ref": "421" + }, + "Usage": "None", + "Properties": [ + { + "$id": "452", + "Name": "Messages", + "SerializedName": "Messages", + "Description": "The messages associated with the request.", + "Type": { + "$id": "453", + "Name": "Array", + "ElementType": { + "$id": "454", + "Name": "Message", + "Namespace": "SkillContext", + "Description": "Represents a message in the chat.", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "455", + "Name": "Content", + "SerializedName": "Content", + "Description": "The content of the message.", + "Type": { + "$id": "456", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "457", + "Name": "Role", + "SerializedName": "Role", + "Description": "The role of the message sender.", + "Type": { + "$id": "458", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "459", + "Name": "Name", + "SerializedName": "Name", + "Description": "The name of the message sender.", + "Type": { + "$id": "460", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "461", + "Name": "FunctionCall", + "SerializedName": "FunctionCall", + "Description": "The function call information.", + "Type": { + "$id": "462", + "Name": "FunctionCall", + "Namespace": "SkillContext", + "Description": "Represents a function call.", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "463", + "Name": "Name", + "SerializedName": "Name", + "Description": "The name of the function.", + "Type": { + "$id": "464", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "465", + "Name": "Arguments", + "SerializedName": "Arguments", + "Description": "The arguments passed to the function.", + "Type": { + "$id": "466", + "Name": "Dictionary", + "KeyType": { + "$id": "467", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "468", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "469", + "Name": "ToolCalls", + "SerializedName": "ToolCalls", + "Description": "The tool calls associated with the message.", + "Type": { + "$id": "470", + "Name": "Array", + "ElementType": { + "$id": "471", + "Name": "ToolCall", + "Namespace": "SkillContext", + "Description": "Represents a tool call.", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "472", + "Name": "Id", + "SerializedName": "Id", + "Description": "The id of the tool call.", + "Type": { + "$id": "473", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "474", + "Name": "Type", + "SerializedName": "Type", + "Description": "The type of the tool call.", + "Type": { + "$id": "475", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "476", + "Name": "Function", + "SerializedName": "Function", + "Description": "The function for the tool call.", + "Type": { + "$id": "477", + "Name": "ToolFunctionCall", + "Namespace": "SkillContext", + "Description": "Represents a tool function call.", + "IsNullable": false, + "Usage": "RoundTrip", + "Properties": [ + { + "$id": "478", + "Name": "Name", + "SerializedName": "Name", + "Description": "The name of the tool function.", + "Type": { + "$id": "479", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "480", + "Name": "Arguments", + "SerializedName": "Arguments", + "Description": "The arguments for the tool function.", + "Type": { + "$id": "481", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "482", + "Name": "ToolCallId", + "SerializedName": "ToolCallId", + "Description": "The identifier for the tool call.", + "Type": { + "$id": "483", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "484", + "Name": "Functions", + "SerializedName": "Functions", + "Description": "The functions associated with the request.", + "Type": { + "$id": "485", + "Name": "Array", + "ElementType": { + "$id": "486", + "Name": "GPTFunction", + "Namespace": "SkillContext", + "Description": "Represents a GPT function definition.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "487", + "Name": "Name", + "SerializedName": "Name", + "Description": "The name of the GPT function.", + "Type": { + "$id": "488", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "489", + "Name": "Description", + "SerializedName": "Description", + "Description": "The description of the GPT function.", + "Type": { + "$id": "490", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "491", + "Name": "Parameters", + "SerializedName": "Parameters", + "Description": "The parameters required by the GPT function.", + "Type": { + "$id": "492", + "Name": "FunctionParameter", + "Namespace": "SkillContext", + "Description": "Represents parameters for a function.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "493", + "Name": "Type", + "SerializedName": "Type", + "Description": "The type of the parameter.", + "Type": { + "$id": "494", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "495", + "Name": "Properties", + "SerializedName": "Properties", + "Description": "The properties of the parameter.", + "Type": { + "$id": "496", + "Name": "Dictionary", + "KeyType": { + "$id": "497", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "498", + "Name": "FunctionParameterProperty", + "Namespace": "SkillContext", + "Description": "Represents parameters properties for a function.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "499", + "Name": "Type", + "SerializedName": "Type", + "Description": "The type of the parameter property.", + "Type": { + "$id": "500", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "501", + "Name": "Description", + "SerializedName": "Description", + "Description": "The description of property of the parameter.", + "Type": { + "$id": "502", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "503", + "Name": "Enum", + "SerializedName": "Enum", + "Description": "The list of enums.", + "Type": { + "$id": "504", + "Name": "Array", + "ElementType": { + "$id": "505", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "506", + "Name": "Required", + "SerializedName": "Required", + "Description": "The list of required properties.", + "Type": { + "$id": "507", + "Name": "Array", + "ElementType": { + "$id": "508", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "509", + "Name": "Result", + "SerializedName": "Result", + "Description": "The result of the GPT function.", + "Type": { + "$id": "510", + "Name": "FunctionResult", + "Namespace": "SkillContext", + "Description": "Represents the result of a function.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "511", + "Name": "Type", + "SerializedName": "Type", + "Description": "The type of the result.", + "Type": { + "$id": "512", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "513", + "Name": "FunctionCall", + "SerializedName": "FunctionCall", + "Description": "Specifies the function to call.", + "Type": { + "$id": "514", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "515", + "Name": "Tools", + "SerializedName": "Tools", + "Description": "The tools available for this request.", + "Type": { + "$id": "516", + "Name": "Array", + "ElementType": { + "$id": "517", + "Name": "Tools", + "Namespace": "SkillContext", + "Description": "Represents a tool.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "518", + "Name": "Type", + "SerializedName": "Type", + "Description": "The type of the tool.", + "Type": { + "$id": "519", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "520", + "Name": "Function", + "SerializedName": "Function", + "Description": "The function definition for the tool.", + "Type": { + "$id": "521", + "Name": "FunctionDefinition", + "Namespace": "SkillContext", + "Description": "Represents the definition of a function.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "522", + "Name": "Description", + "SerializedName": "Description", + "Description": "The description of the function.", + "Type": { + "$id": "523", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "524", + "Name": "Name", + "SerializedName": "Name", + "Description": "The name of the function.", + "Type": { + "$id": "525", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "526", + "Name": "Parameters", + "SerializedName": "Parameters", + "Description": "The parameters for the function.", + "Type": { + "$id": "527", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "528", + "Name": "ToolChoice", + "SerializedName": "ToolChoice", + "Description": "The selected tool for execution.", + "Type": { + "$id": "529", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "530", + "Name": "ParallelToolCalls", + "SerializedName": "ParallelToolCalls", + "Description": "Indicates whether tools can be called in parallel.", + "Type": { + "$id": "531", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$id": "532", + "Name": "CompletionRequest", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$ref": "421" + }, + "Usage": "Input", + "Properties": [ + { + "$id": "533", + "Name": "Prompt", + "SerializedName": "Prompt", + "Description": "", + "Type": { + "$id": "534", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + } + ] + }, + "Usage": "Input", + "Properties": [ + { + "$id": "535", + "Name": "Messages", + "SerializedName": "Messages", + "Description": "The messages associated with the request.", + "Type": { + "$id": "536", + "Name": "Array", + "ElementType": { + "$ref": "454" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "537", + "Name": "Functions", + "SerializedName": "Functions", + "Description": "The functions associated with the request.", + "Type": { + "$id": "538", + "Name": "Array", + "ElementType": { + "$ref": "486" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "539", + "Name": "FunctionCall", + "SerializedName": "FunctionCall", + "Description": "Specifies the function to call.", + "Type": { + "$id": "540", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "541", + "Name": "Tools", + "SerializedName": "Tools", + "Description": "The tools available for this request.", + "Type": { + "$id": "542", + "Name": "Array", + "ElementType": { + "$ref": "517" + }, + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "543", + "Name": "ToolChoice", + "SerializedName": "ToolChoice", + "Description": "The selected tool for execution.", + "Type": { + "$id": "544", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "545", + "Name": "ParallelToolCalls", + "SerializedName": "ParallelToolCalls", + "Description": "Indicates whether tools can be called in parallel.", + "Type": { + "$id": "546", + "Name": "boolean", + "Kind": "Boolean", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "547", + "Name": "openAiExecutionContext", + "SerializedName": "openAiExecutionContext", + "Description": "The Azure OpenAI execution context.", + "Type": { + "$ref": "314" + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$ref": "421" + }, + { + "$ref": "420" + }, + { + "$ref": "454" + }, + { + "$ref": "462" + }, + { + "$ref": "471" + }, + { + "$ref": "477" + }, + { + "$ref": "486" + }, + { + "$ref": "492" + }, + { + "$ref": "498" + }, + { + "$ref": "510" + }, + { + "$ref": "517" + }, + { + "$ref": "521" + }, + { + "$ref": "532" + }, + { + "$id": "548", + "Name": "BaseCompletionResponse", + "Namespace": "SkillContext", + "Description": "Represents the base completion response.", + "IsNullable": false, + "Usage": "None", + "Properties": [ + { + "$id": "549", + "Name": "Id", + "SerializedName": "Id", + "Description": "The unique identifier for the response.", + "Type": { + "$id": "550", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "551", + "Name": "Object", + "SerializedName": "Object", + "Description": "The object type.", + "Type": { + "$id": "552", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "553", + "Name": "Created", + "SerializedName": "Created", + "Description": "The creation timestamp.", + "Type": { + "$id": "554", + "Name": "utcDateTime", + "Kind": "DateTime", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "555", + "Name": "Model", + "SerializedName": "Model", + "Description": "The model used for completion.", + "Type": { + "$id": "556", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "557", + "Name": "Usage", + "SerializedName": "Usage", + "Description": "The usage statistics for the response.", + "Type": { + "$id": "558", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "559", + "Name": "PromptFilterResults", + "SerializedName": "PromptFilterResults", + "Description": "The results of prompt filtering.", + "Type": { + "$id": "560", + "Name": "Array", + "ElementType": { + "$id": "561", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ], + "DerivedModels": [ + { + "$id": "562", + "Name": "ChatCompletionResponse", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$ref": "548" + }, + "Usage": "None", + "Properties": [ + { + "$id": "563", + "Name": "Choices", + "SerializedName": "Choices", + "Description": "List of choices in the chat completion response.", + "Type": { + "$id": "564", + "Name": "Array", + "ElementType": { + "$id": "565", + "Name": "ChatChoice", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$id": "566", + "Name": "BaseChoice", + "Namespace": "SkillContext", + "IsNullable": false, + "Usage": "None", + "Properties": [ + { + "$id": "567", + "Name": "Index", + "SerializedName": "Index", + "Description": "", + "Type": { + "$id": "568", + "Name": "int32", + "Kind": "Int32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "569", + "Name": "LogProbs", + "SerializedName": "LogProbs", + "Description": "Log probabilities for this choice.", + "Type": { + "$id": "570", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "571", + "Name": "FinishReason", + "SerializedName": "FinishReason", + "Description": "The reason why the operation finished.", + "Type": { + "$id": "572", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "573", + "Name": "ContentFilterResults", + "SerializedName": "ContentFilterResults", + "Description": "This object contains the list of content filter annotations.", + "Type": { + "$id": "574", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "575", + "Name": "ContentFilterError", + "SerializedName": "ContentFilterError", + "Description": "This indicates when the content filtering system does not run on the chat completion.", + "Type": { + "$id": "576", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + } + ], + "DerivedModels": [ + { + "$id": "577", + "Name": "ChatChoice", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$ref": "566" + }, + "Usage": "None", + "Properties": [ + { + "$id": "578", + "Name": "Message", + "SerializedName": "Message", + "Description": "The message associated with the chat choice.", + "Type": { + "$ref": "454" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "579", + "Name": "Choice", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$ref": "566" + }, + "Usage": "Output", + "Properties": [ + { + "$id": "580", + "Name": "Text", + "SerializedName": "Text", + "Description": "", + "Type": { + "$id": "581", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + } + ] + }, + "Usage": "Output", + "Properties": [ + { + "$id": "582", + "Name": "Message", + "SerializedName": "Message", + "Description": "The message associated with the chat choice.", + "Type": { + "$ref": "454" + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$id": "583", + "Name": "CompletionResponse", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$ref": "548" + }, + "Usage": "Output", + "Properties": [ + { + "$id": "584", + "Name": "Choices", + "SerializedName": "Choices", + "Description": "", + "Type": { + "$id": "585", + "Name": "Array", + "ElementType": { + "$ref": "579" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + } + ] + }, + { + "$id": "586", + "Name": "ChatCompletionResponse", + "Namespace": "SkillContext", + "IsNullable": false, + "BaseModel": { + "$ref": "548" + }, + "Usage": "Output", + "Properties": [ + { + "$id": "587", + "Name": "Choices", + "SerializedName": "Choices", + "Description": "List of choices in the chat completion response.", + "Type": { + "$id": "588", + "Name": "Array", + "ElementType": { + "$ref": "565" + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$ref": "566" + }, + { + "$ref": "565" + }, + { + "$ref": "579" + }, + { + "$ref": "583" + }, + { + "$id": "589", + "Name": "CreateCompletionRequest", + "Namespace": "SkillContext", + "Description": "Represents a request to create a chat completion.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "590", + "Name": "deploymentId", + "SerializedName": "deploymentId", + "Description": "The deployment ID.", + "Type": { + "$id": "591", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "592", + "Name": "completionRequest", + "SerializedName": "completionRequest", + "Description": "The chat completion request details.", + "Type": { + "$ref": "532" + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "593", + "Name": "openAiExecutionContext", + "SerializedName": "openAiExecutionContext", + "Description": "The Azure OpenAI execution context.", + "Type": { + "$ref": "314" + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$id": "594", + "Name": "CreateEmbeddingRequest", + "Namespace": "SkillContext", + "Description": "Represents a request to create embedding.", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "595", + "Name": "deploymentId", + "SerializedName": "deploymentId", + "Description": "The deployment ID.", + "Type": { + "$id": "596", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": false, + "IsReadOnly": false + }, + { + "$id": "597", + "Name": "embeddingRequest", + "SerializedName": "embeddingRequest", + "Description": "The embedding request details.", + "Type": { + "$id": "598", + "Name": "EmbeddingRequest", + "Namespace": "SkillContext", + "IsNullable": false, + "Usage": "Input", + "Properties": [ + { + "$id": "599", + "Name": "Input", + "SerializedName": "Input", + "Description": "The object to embed.", + "Type": { + "$id": "600", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "601", + "Name": "openAiExecutionContext", + "SerializedName": "openAiExecutionContext", + "Description": "The Azure OpenAI execution context.", + "Type": { + "$ref": "314" + }, + "IsRequired": false, + "IsReadOnly": false + } + ] + }, + { + "$ref": "598" + }, + { + "$id": "602", + "Name": "EmbeddingResponse", + "Namespace": "SkillContext", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "603", + "Name": "Data", + "SerializedName": "Data", + "Description": "", + "Type": { + "$id": "604", + "Name": "Array", + "ElementType": { + "$id": "605", + "Name": "EmbeddingData", + "Namespace": "SkillContext", + "IsNullable": false, + "Usage": "Output", + "Properties": [ + { + "$id": "606", + "Name": "Embedding", + "SerializedName": "Embedding", + "Description": "", + "Type": { + "$id": "607", + "Name": "Array", + "ElementType": { + "$id": "608", + "Name": "float32", + "Kind": "Float32", + "IsNullable": false + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "609", + "Name": "Index", + "SerializedName": "Index", + "Description": "", + "Type": { + "$id": "610", + "Name": "int32", + "Kind": "Int32", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "611", + "Name": "Object", + "SerializedName": "Object", + "Description": "", + "Type": { + "$id": "612", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "613", + "Name": "Model", + "SerializedName": "Model", + "Description": "", + "Type": { + "$id": "614", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "615", + "Name": "Object", + "SerializedName": "Object", + "Description": "", + "Type": { + "$id": "616", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + }, + { + "$id": "617", + "Name": "Usage", + "SerializedName": "Usage", + "Description": "", + "Type": { + "$id": "618", + "Name": "Intrinsic", + "Kind": "unknown", + "IsNullable": false + }, + "IsRequired": true, + "IsReadOnly": false + } + ] + }, + { + "$ref": "605" + } + ], + "Clients": [ + { + "$id": "619", + "Name": "SkillContextClient", + "Description": "The Skillset Authoring API exposes endpoints allowing a skill to interact with the current session to perform actions such as accessing previous prompts/responses within the current session, \nreading the inputs of the skill, invoking other skills, reporting progress of execution, returning results/errors, acquiring tokens to access other resources, and retrieving skill specific settings. It also provides methods to interact with Open\nAI client to create chat completion and get embeddings.", + "Operations": [ + { + "$id": "620", + "Name": "getSkillContext", + "ResourceName": "SkillContext", + "Description": "Get the SkillContext for the current skill invocation", + "Parameters": [ + { + "$id": "621", + "Name": "endpoint", + "NameInRequest": "endpoint", + "Description": "Supported Security Copilot API endpoints (protocol and host name, such as\nhttps://api.medeina-dev.defender.microsoft.com).", + "Type": { + "$id": "622", + "Name": "Uri", + "Kind": "Uri", + "IsNullable": false + }, + "Location": "Uri", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": true, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client" + }, + { + "$id": "623", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "624", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "625", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "626", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "627", + "Type": { + "$ref": "626" + }, + "Value": "application/json" + } + }, + { + "$id": "628", + "Name": "apiVersion", + "NameInRequest": "api-version", + "Description": "", + "Type": { + "$id": "629", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Query", + "IsRequired": true, + "IsApiVersion": true, + "IsContentType": false, + "IsEndpoint": false, + "IsResourceParameter": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Client", + "DefaultValue": { + "$id": "630", + "Type": { + "$id": "631", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Value": "2023-08-01-preview" + } + } + ], + "Responses": [ + { + "$id": "632", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "67" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "633", + "Name": "invokeSkill", + "ResourceName": "SkillContext", + "Description": "Invokes a skill. Allows current skill to invoke dependency skills.", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "634", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "635", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "636", + "Name": "invokeSkill", + "NameInRequest": "invokeSkill", + "Type": { + "$ref": "272" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "637", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "638", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "639", + "Type": { + "$ref": "638" + }, + "Value": "application/json" + } + }, + { + "$id": "640", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "641", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "642", + "Type": { + "$ref": "641" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "643", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "215" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/invokeSkill", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "644", + "Name": "getSkillDescriptor", + "ResourceName": "SkillContext", + "Description": "Get skill descriptor", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "645", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "646", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "647", + "Name": "skillName", + "NameInRequest": "skillName", + "Type": { + "$id": "648", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "649", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "650", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "651", + "Type": { + "$ref": "650" + }, + "Value": "application/json" + } + }, + { + "$id": "652", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "653", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "654", + "Type": { + "$ref": "653" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "655", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "69" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/skillDescriptor", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "656", + "Name": "getSkillDescriptors", + "ResourceName": "SkillContext", + "Description": "Get skill descriptors", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "657", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "658", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "659", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "660", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "661", + "Type": { + "$ref": "660" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "662", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "663", + "Name": "Array", + "ElementType": { + "$ref": "69" + }, + "IsNullable": false + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/skillDescriptors", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "664", + "Name": "getSkillsetDescriptors", + "ResourceName": "SkillContext", + "Description": "Get skillset descriptors", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "665", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "666", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "667", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "668", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "669", + "Type": { + "$ref": "668" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "670", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "671", + "Name": "Array", + "ElementType": { + "$ref": "71" + }, + "IsNullable": false + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/skillsetDescriptors", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "672", + "Name": "getExecutionContext", + "ResourceName": "SkillContext", + "Description": "Get execution context", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "673", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "674", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "675", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "676", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "677", + "Type": { + "$ref": "676" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "678", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "280" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/executionContext", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "679", + "Name": "getPromptHistory", + "ResourceName": "SkillContext", + "Description": "Get prompt history", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "680", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "681", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "682", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "683", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "684", + "Type": { + "$ref": "683" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "685", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "336" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/promptHistory", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "686", + "Name": "logProgress", + "ResourceName": "SkillContext", + "Description": "Log a progress message for a skill invocation", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "687", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "688", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "689", + "Name": "logProgressRequest", + "NameInRequest": "logProgressRequest", + "Type": { + "$ref": "344" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "690", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "691", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "692", + "Type": { + "$ref": "691" + }, + "Value": "application/json" + } + }, + { + "$id": "693", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "694", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "695", + "Type": { + "$ref": "694" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "696", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/logProgress", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "697", + "Name": "setSkillOutput", + "ResourceName": "SkillContext", + "Description": "Sets the skill output", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "698", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "699", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "700", + "Name": "evaluationResultOutput", + "NameInRequest": "evaluationResultOutput", + "Type": { + "$ref": "348" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "701", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "702", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "703", + "Type": { + "$ref": "702" + }, + "Value": "application/json" + } + }, + { + "$id": "704", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "705", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "706", + "Type": { + "$ref": "705" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "707", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/setOutputAsync", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "708", + "Name": "getSkillsetSettings", + "ResourceName": "SkillContext", + "Description": "Gets the skillset settings", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "709", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "710", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "711", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "712", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "713", + "Type": { + "$ref": "712" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "714", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$id": "715", + "Name": "Dictionary", + "KeyType": { + "$id": "716", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "ValueType": { + "$id": "717", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "IsNullable": false + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/skillsetSettings", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "718", + "Name": "setSkillInvocationStarted", + "ResourceName": "SkillContext", + "Description": "Notifies security copilot backend service that the skill has been invoked", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "719", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "720", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "721", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "722", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "723", + "Type": { + "$ref": "722" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "724", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/setSkillInvocationStarted", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "725", + "Name": "setSkillInvocationCompleted", + "ResourceName": "SkillContext", + "Description": "Notifies security copilot backend service that the skill invocation has completed", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "726", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "727", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "728", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "729", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "730", + "Type": { + "$ref": "729" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "731", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/setSkillInvocationCompleted", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "732", + "Name": "getSkillsetAuthInfo", + "ResourceName": "SkillContext", + "Description": "Gets the skillset auth related information", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "733", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "734", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "735", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "736", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "737", + "Type": { + "$ref": "736" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "738", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "373" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "None", + "Uri": "{endpoint}", + "Path": "/skillContext/getSkillsetAuthInfoAsync", + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "739", + "Name": "getTokenCredential", + "ResourceName": "SkillContext", + "Description": "Gets the token credentials", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "740", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "741", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "742", + "Name": "getTokenCredentialRequest", + "NameInRequest": "getTokenCredentialRequest", + "Type": { + "$ref": "379" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "743", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "744", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "745", + "Type": { + "$ref": "744" + }, + "Value": "application/json" + } + }, + { + "$id": "746", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "747", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "748", + "Type": { + "$ref": "747" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "749", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "386" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/getTokenCredentialAsync", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "750", + "Name": "getInput", + "ResourceName": "SkillContext", + "Description": "Gets the skill input", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "751", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "752", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "753", + "Name": "getInputRequest", + "NameInRequest": "getInputRequest", + "Type": { + "$ref": "391" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "754", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "755", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "756", + "Type": { + "$ref": "755" + }, + "Value": "application/json" + } + }, + { + "$id": "757", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "758", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "759", + "Type": { + "$ref": "758" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "760", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "208" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + }, + { + "$id": "761", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "GET", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/getInputAsync", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "762", + "Name": "setInput", + "ResourceName": "SkillContext", + "Description": "Sets the input for the skill", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "763", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "764", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "765", + "Name": "setInputRequest", + "NameInRequest": "setInputRequest", + "Type": { + "$ref": "395" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "766", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "767", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "768", + "Type": { + "$ref": "767" + }, + "Value": "application/json" + } + }, + { + "$id": "769", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "770", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "771", + "Type": { + "$ref": "770" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "772", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/setInputAsync", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "773", + "Name": "addSources", + "ResourceName": "SkillContext", + "Description": "Adds a list of sources to the output", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "774", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "775", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "776", + "Name": "addSourcesRequest", + "NameInRequest": "addSourcesRequest", + "Type": { + "$ref": "399" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "777", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "778", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "779", + "Type": { + "$ref": "778" + }, + "Value": "application/json" + } + }, + { + "$id": "780", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "781", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "782", + "Type": { + "$ref": "781" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "783", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/AddSources", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "784", + "Name": "addSource", + "ResourceName": "SkillContext", + "Description": "Adds a source to the output", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "785", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "786", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "787", + "Name": "addSourceRequest", + "NameInRequest": "addSourceRequest", + "Type": { + "$ref": "402" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "788", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "789", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "790", + "Type": { + "$ref": "789" + }, + "Value": "application/json" + } + }, + { + "$id": "791", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "792", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "793", + "Type": { + "$ref": "792" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "794", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/AddSource", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "795", + "Name": "addSuggestedPrompts", + "ResourceName": "SkillContext", + "Description": " Adds a list of suggested prompts to the skill context", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "796", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "797", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "798", + "Name": "addSuggestedPromptsRequest", + "NameInRequest": "addSuggestedPromptsRequest", + "Type": { + "$ref": "404" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "799", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "800", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "801", + "Type": { + "$ref": "800" + }, + "Value": "application/json" + } + }, + { + "$id": "802", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "803", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "804", + "Type": { + "$ref": "803" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "805", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/AddSuggestedPrompts", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "806", + "Name": "setFinalResponseSettings", + "ResourceName": "SkillContext", + "Description": "Sets the final response settings", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "807", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "808", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "809", + "Name": "setFinalResponseSettingsRequest", + "NameInRequest": "setFinalResponseSettingsRequest", + "Type": { + "$ref": "407" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "810", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "811", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "812", + "Type": { + "$ref": "811" + }, + "Value": "application/json" + } + }, + { + "$id": "813", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "814", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "815", + "Type": { + "$ref": "814" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "816", + "StatusCodes": [ + 204 + ], + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/skillContext/SetFinalResponseSettings", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "817", + "Name": "createChatCompletion", + "ResourceName": "SkillContext", + "Description": "Executes an Open AI Chat completion request", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "818", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "819", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "820", + "Name": "request", + "NameInRequest": "request", + "Type": { + "$ref": "416" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "821", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "822", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "823", + "Type": { + "$ref": "822" + }, + "Value": "application/json" + } + }, + { + "$id": "824", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "825", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "826", + "Type": { + "$ref": "825" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "827", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "586" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/medeinaOpenAI/createChatCompletion", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "828", + "Name": "createCompletion", + "ResourceName": "SkillContext", + "Description": "Executes an Open AI completion request", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "829", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "830", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "831", + "Name": "request", + "NameInRequest": "request", + "Type": { + "$ref": "589" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "832", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "833", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "834", + "Type": { + "$ref": "833" + }, + "Value": "application/json" + } + }, + { + "$id": "835", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "836", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "837", + "Type": { + "$ref": "836" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "838", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "583" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/medeinaOpenAI/createCompletion", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + }, + { + "$id": "839", + "Name": "CreateEmbedding", + "ResourceName": "SkillContext", + "Description": "Creates Embedding for a prompt or message", + "Parameters": [ + { + "$ref": "621" + }, + { + "$id": "840", + "Name": "evaluationToken", + "NameInRequest": "X-MS-SecurityCopilot-EvaluationToken", + "Type": { + "$id": "841", + "Name": "string", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "842", + "Name": "request", + "NameInRequest": "request", + "Type": { + "$ref": "594" + }, + "Location": "Body", + "IsRequired": true, + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Method" + }, + { + "$id": "843", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Type": { + "$id": "844", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": true, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "845", + "Type": { + "$ref": "844" + }, + "Value": "application/json" + } + }, + { + "$id": "846", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "847", + "Name": "String", + "Kind": "String", + "IsNullable": false + }, + "Location": "Header", + "IsApiVersion": false, + "IsResourceParameter": false, + "IsContentType": false, + "IsRequired": true, + "IsEndpoint": false, + "SkipUrlEncoding": false, + "Explode": false, + "Kind": "Constant", + "DefaultValue": { + "$id": "848", + "Type": { + "$ref": "847" + }, + "Value": "application/json" + } + }, + { + "$ref": "628" + } + ], + "Responses": [ + { + "$id": "849", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "602" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{endpoint}", + "Path": "/medeinaOpenAI/CreateEmbedding", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true + } + ], + "Protocol": { + "$id": "850" + }, + "Creatable": true + } + ], + "Auth": { + "$id": "851" + } +} diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Microsoft.Security.Copilot.SkillsetAuthoring.csproj b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Microsoft.Security.Copilot.SkillsetAuthoring.csproj new file mode 100644 index 000000000000..bc33c653d55e --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/Microsoft.Security.Copilot.SkillsetAuthoring.csproj @@ -0,0 +1,20 @@ + + + This is the Microsoft.Security.Copilot.SkillsetAuthoring client library for developing .NET applications with rich experience. + Azure SDK Code Generation Microsoft.Security.Copilot.SkillsetAuthoring for Azure Data Plane + 1.0.0-beta.1 + Microsoft.Security.Copilot.SkillsetAuthoring + $(RequiredTargetFrameworks) + true + + + + + + + + + + + + diff --git a/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/tsp-location.yaml b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/tsp-location.yaml new file mode 100644 index 000000000000..bd6530cb23aa --- /dev/null +++ b/sdk/securitycopilot/Microsoft.Security.Copilot.SkillsetAuthoring/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/securitycopilot/TypeSpec +commit: a4ea13d8e5a764b438a1ad2b88c1c3cc37a8e5eb +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/securitycopilot/tests/Generated/Samples/Samples_SkillContextClient.cs b/sdk/securitycopilot/tests/Generated/Samples/Samples_SkillContextClient.cs new file mode 100644 index 000000000000..03076acd09e2 --- /dev/null +++ b/sdk/securitycopilot/tests/Generated/Samples/Samples_SkillContextClient.cs @@ -0,0 +1,3681 @@ +// 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.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using Microsoft.Security.Copilot.SkillsetAuthoring.Models; +using NUnit.Framework; + +namespace Microsoft.Security.Copilot.SkillsetAuthoring.Samples +{ + public class Samples_SkillContextClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillContext() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillContext("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("enableVariableSubstitutionInCompose").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("featureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("valueStoredAsJson").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("userId").ToString()); + Console.WriteLine(result.GetProperty("sessionId").ToString()); + Console.WriteLine(result.GetProperty("promptId").ToString()); + Console.WriteLine(result.GetProperty("evaluationId").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("workspaceId").ToString()); + Console.WriteLine(result.GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("invocationType").ToString()); + Console.WriteLine(result.GetProperty("invocationCategory").ToString()); + Console.WriteLine(result.GetProperty("userName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillContext_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillContext("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("enableVariableSubstitutionInCompose").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("featureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("valueStoredAsJson").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("userId").ToString()); + Console.WriteLine(result.GetProperty("sessionId").ToString()); + Console.WriteLine(result.GetProperty("promptId").ToString()); + Console.WriteLine(result.GetProperty("evaluationId").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("workspaceId").ToString()); + Console.WriteLine(result.GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("invocationType").ToString()); + Console.WriteLine(result.GetProperty("invocationCategory").ToString()); + Console.WriteLine(result.GetProperty("userName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillContext_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillContextAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("enableVariableSubstitutionInCompose").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("featureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("valueStoredAsJson").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("userId").ToString()); + Console.WriteLine(result.GetProperty("sessionId").ToString()); + Console.WriteLine(result.GetProperty("promptId").ToString()); + Console.WriteLine(result.GetProperty("evaluationId").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("workspaceId").ToString()); + Console.WriteLine(result.GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("invocationType").ToString()); + Console.WriteLine(result.GetProperty("invocationCategory").ToString()); + Console.WriteLine(result.GetProperty("userName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillContext_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillContextAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("outputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("descriptor").GetProperty("enableVariableSubstitutionInCompose").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("featureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("inputs").GetProperty("").GetProperty("valueStoredAsJson").ToString()); + Console.WriteLine(result.GetProperty("properties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("startTime").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("userId").ToString()); + Console.WriteLine(result.GetProperty("sessionId").ToString()); + Console.WriteLine(result.GetProperty("promptId").ToString()); + Console.WriteLine(result.GetProperty("evaluationId").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("complianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("workspaceId").ToString()); + Console.WriteLine(result.GetProperty("source").ToString()); + Console.WriteLine(result.GetProperty("invocationType").ToString()); + Console.WriteLine(result.GetProperty("invocationCategory").ToString()); + Console.WriteLine(result.GetProperty("userName").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillContext_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var result = await client.GetSkillContextAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_InvokeSkill() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillName = "", + inputs = new + { + key = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + valueStoredAsJson = true, + }, + }, + }; + + Response response = client.InvokeSkill("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); + Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("outputLanguage").ToString()); + Console.WriteLine(result.GetProperty("outputType").ToString()); + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_InvokeSkill_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillsetName = "", + skillName = "", + inputs = new + { + key = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }, + }; + + Response response = client.InvokeSkill("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceSerializedData").ToString()); + Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("outputLanguage").ToString()); + Console.WriteLine(result.GetProperty("outputType").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_InvokeSkill_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillName = "", + inputs = new + { + key = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + valueStoredAsJson = true, + }, + }, + }; + + Response response = await client.InvokeSkillAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); + Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("outputLanguage").ToString()); + Console.WriteLine(result.GetProperty("outputType").ToString()); + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_InvokeSkill_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillsetName = "", + skillName = "", + inputs = new + { + key = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }, + }; + + Response response = await client.InvokeSkillAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceContent").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceType").ToString()); + Console.WriteLine(result.GetProperty("sources")[0].GetProperty("sourceSerializedData").ToString()); + Console.WriteLine(result.GetProperty("suggestedPrompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("skillInputs").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("outputLanguage").ToString()); + Console.WriteLine(result.GetProperty("outputType").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_InvokeSkill_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var invokeSkill = new InvokeSkillRequest("", new Dictionary + { + ["key"] = new SkillVariable(true) + { + Type = "", + Value = "", + }, + }) + { + SkillsetName = "", + }; + var result = await client.InvokeSkillAsync("", invokeSkill); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillDescriptor() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = ""; + + Response response = client.GetSkillDescriptor("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillDescriptor_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = ""; + + Response response = client.GetSkillDescriptor("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillDescriptor_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = ""; + + Response response = await client.GetSkillDescriptorAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillDescriptor_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = ""; + + Response response = await client.GetSkillDescriptorAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result.GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("format").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("altName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result.GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result.GetProperty("hidden").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result.GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("outputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result.GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("userVisibility").ToString()); + Console.WriteLine(result.GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result.GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result.GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result.GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result.GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillDescriptor_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var skillName = ""; + var result = await client.GetSkillDescriptorAsync("", skillName); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillDescriptors() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillDescriptors("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("format").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("altName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result[0].GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillDescriptors_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillDescriptors("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("format").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("altName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result[0].GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillDescriptors_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillDescriptorsAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("format").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("altName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result[0].GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillDescriptors_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillDescriptorsAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("skillset").GetProperty("ownersGroupId").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("format").ToString()); + Console.WriteLine(result[0].GetProperty("displayName").ToString()); + Console.WriteLine(result[0].GetProperty("altName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillsetName").ToString()); + Console.WriteLine(result[0].GetProperty("dependencies")[0].GetProperty("skillName").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("examplePrompts")[0].ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("placeholderValue").ToString()); + Console.WriteLine(result[0].GetProperty("inputs")[0].GetProperty("enum")[0].ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("type").GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("outputs")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("promptAlignedName").ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("settings").GetProperty("").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryStartMessage").ToString()); + Console.WriteLine(result[0].GetProperty("skillSummaryMetadata").GetProperty("summaryEndMessage").ToString()); + Console.WriteLine(result[0].GetProperty("enableVariableSubstitutionInCompose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillDescriptors_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var result = await client.GetSkillDescriptorsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillsetDescriptors() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillsetDescriptors("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("ownersGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillsetDescriptors_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillsetDescriptors("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("ownersGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetDescriptors_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillsetDescriptorsAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("ownersGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetDescriptors_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillsetDescriptorsAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result[0].GetProperty("namespace").ToString()); + Console.WriteLine(result[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("descriptionDisplay").ToString()); + Console.WriteLine(result[0].GetProperty("disaplyName").ToString()); + Console.WriteLine(result[0].GetProperty("icon").ToString()); + Console.WriteLine(result[0].GetProperty("category").ToString()); + Console.WriteLine(result[0].GetProperty("catalogScope").ToString()); + Console.WriteLine(result[0].GetProperty("enabled").ToString()); + Console.WriteLine(result[0].GetProperty("hidden").ToString()); + Console.WriteLine(result[0].GetProperty("prerequisites")[0].ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("name").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("label").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("description").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("hintText").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("settingType").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("required").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("defaultValue").ToString()); + Console.WriteLine(result[0].GetProperty("settings")[0].GetProperty("value").ToString()); + Console.WriteLine(result[0].GetProperty("authorization").GetProperty("type").ToString()); + Console.WriteLine(result[0].GetProperty("supportedAuthTypes")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("userVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibilityFeatureFlags")[0].ToString()); + Console.WriteLine(result[0].GetProperty("plannerVisibility").ToString()); + Console.WriteLine(result[0].GetProperty("creatorUserId").ToString()); + Console.WriteLine(result[0].GetProperty("ownersGroupId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetDescriptors_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var result = await client.GetSkillsetDescriptorsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetExecutionContext() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetExecutionContext("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("SessionId").ToString()); + Console.WriteLine(result.GetProperty("PromptId").ToString()); + Console.WriteLine(result.GetProperty("EvaluationId").ToString()); + Console.WriteLine(result.GetProperty("TenantId").ToString()); + Console.WriteLine(result.GetProperty("AccountId").ToString()); + Console.WriteLine(result.GetProperty("WorkspaceId").ToString()); + Console.WriteLine(result.GetProperty("UserName").ToString()); + Console.WriteLine(result.GetProperty("Source").ToString()); + Console.WriteLine(result.GetProperty("UnauthenticatedSourceApplicationId").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkills").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkillsets")[0].ToString()); + Console.WriteLine(result.GetProperty("IsFidelisUser").ToString()); + Console.WriteLine(result.GetProperty("InvocationType").ToString()); + Console.WriteLine(result.GetProperty("InvocationCategory").ToString()); + Console.WriteLine(result.GetProperty("EncryptedUserAccessToken").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ApiVersion").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("Environment").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("IsGPUProxyEnabled").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("CustomerAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("EcsAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("PreviewState").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetExecutionContext_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetExecutionContext("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("SessionId").ToString()); + Console.WriteLine(result.GetProperty("PromptId").ToString()); + Console.WriteLine(result.GetProperty("EvaluationId").ToString()); + Console.WriteLine(result.GetProperty("TenantId").ToString()); + Console.WriteLine(result.GetProperty("AccountId").ToString()); + Console.WriteLine(result.GetProperty("WorkspaceId").ToString()); + Console.WriteLine(result.GetProperty("UserName").ToString()); + Console.WriteLine(result.GetProperty("ApplicationId").ToString()); + Console.WriteLine(result.GetProperty("Source").ToString()); + Console.WriteLine(result.GetProperty("UnauthenticatedSourceApplicationId").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkills").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkillsets")[0].ToString()); + Console.WriteLine(result.GetProperty("IsFidelisUser").ToString()); + Console.WriteLine(result.GetProperty("InvocationType").ToString()); + Console.WriteLine(result.GetProperty("InvocationCategory").ToString()); + Console.WriteLine(result.GetProperty("EncryptedUserAccessToken").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ApiVersion").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("Environment").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("IsGPUProxyEnabled").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("GpuProcessingGeo").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("CustomerAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("EcsAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ContentFilterProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ReportingProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("PreviewState").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetExecutionContext_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetExecutionContextAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("SessionId").ToString()); + Console.WriteLine(result.GetProperty("PromptId").ToString()); + Console.WriteLine(result.GetProperty("EvaluationId").ToString()); + Console.WriteLine(result.GetProperty("TenantId").ToString()); + Console.WriteLine(result.GetProperty("AccountId").ToString()); + Console.WriteLine(result.GetProperty("WorkspaceId").ToString()); + Console.WriteLine(result.GetProperty("UserName").ToString()); + Console.WriteLine(result.GetProperty("Source").ToString()); + Console.WriteLine(result.GetProperty("UnauthenticatedSourceApplicationId").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkills").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkillsets")[0].ToString()); + Console.WriteLine(result.GetProperty("IsFidelisUser").ToString()); + Console.WriteLine(result.GetProperty("InvocationType").ToString()); + Console.WriteLine(result.GetProperty("InvocationCategory").ToString()); + Console.WriteLine(result.GetProperty("EncryptedUserAccessToken").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ApiVersion").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("Environment").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("IsGPUProxyEnabled").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("CustomerAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("EcsAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("PreviewState").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetExecutionContext_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetExecutionContextAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("SessionId").ToString()); + Console.WriteLine(result.GetProperty("PromptId").ToString()); + Console.WriteLine(result.GetProperty("EvaluationId").ToString()); + Console.WriteLine(result.GetProperty("TenantId").ToString()); + Console.WriteLine(result.GetProperty("AccountId").ToString()); + Console.WriteLine(result.GetProperty("WorkspaceId").ToString()); + Console.WriteLine(result.GetProperty("UserName").ToString()); + Console.WriteLine(result.GetProperty("ApplicationId").ToString()); + Console.WriteLine(result.GetProperty("Source").ToString()); + Console.WriteLine(result.GetProperty("UnauthenticatedSourceApplicationId").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkills").ToString()); + Console.WriteLine(result.GetProperty("SelectedSkillsets")[0].ToString()); + Console.WriteLine(result.GetProperty("IsFidelisUser").ToString()); + Console.WriteLine(result.GetProperty("InvocationType").ToString()); + Console.WriteLine(result.GetProperty("InvocationCategory").ToString()); + Console.WriteLine(result.GetProperty("EncryptedUserAccessToken").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("recordLog").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToEyesOnProductImprovement").ToString()); + Console.WriteLine(result.GetProperty("ComplianceFlags").GetProperty("customerOptedInToModelImprovement").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ApiVersion").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("Environment").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("IsGPUProxyEnabled").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("GpuProcessingGeo").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("CustomerAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("EcsAllowCrossGeoCompute").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ContentFilterProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("AzureOpenAIExecutionContext").GetProperty("ReportingProperties").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("PreviewState").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetExecutionContext_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var result = await client.GetExecutionContextAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetPromptHistory() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetPromptHistory("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("response").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetPromptHistory_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetPromptHistory("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("response").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetPromptHistory_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetPromptHistoryAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("response").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetPromptHistory_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetPromptHistoryAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("prompt").ToString()); + Console.WriteLine(result.GetProperty("prompts")[0].GetProperty("response").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetPromptHistory_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var result = await client.GetPromptHistoryAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LogProgress() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + message = "", + }; + + Response response = client.LogProgress("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_LogProgress_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + level = "Error", + message = "", + }; + + Response response = client.LogProgress("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LogProgress_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + message = "", + }; + + Response response = await client.LogProgressAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LogProgress_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + level = "Error", + message = "", + }; + + Response response = await client.LogProgressAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_LogProgress_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var logProgressRequest = new LogProgressRequest("") + { + Level = ProgressLogLevel.Error, + }; + var result = await client.LogProgressAsync("", logProgressRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetSkillOutput() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillOutputType = "Primitive", + }; + + Response response = client.SetSkillOutput("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetSkillOutput_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillOutputType = "Primitive", + primitiveOutput = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + structuredOutput = new + { + components = new[] { + new { + action = "None", + includeInEvalResultAsRawComponent = true, + name = "", + content = "", + description = "", + type = "GptOutput", + } + }, + }, + primitiveOutputValue = "", + }; + + Response response = client.SetSkillOutput("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetSkillOutput_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillOutputType = "Primitive", + }; + + Response response = await client.SetSkillOutputAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetSkillOutput_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + skillOutputType = "Primitive", + primitiveOutput = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + structuredOutput = new + { + components = new[] { + new { + action = "None", + includeInEvalResultAsRawComponent = true, + name = "", + content = "", + description = "", + type = "GptOutput", + } + }, + }, + primitiveOutputValue = "", + }; + + Response response = await client.SetSkillOutputAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetSkillOutput_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var evaluationResultOutput = new EvaluationResultOutput(SkillOutputType.Primitive) + { + PrimitiveOutput = new OutputSkillVariable(true, new SkillSource[] + { + new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", + } + }, new SuggestedPrompt[] + { + new SuggestedPrompt("") + }, "", new Dictionary + { + ["key"] = "", + }, "", SkillOutputType.Primitive) + { + Type = "", + Value = "", + }, + StructuredOutput = new SkillStructuredOutput(new SkillOutputComponent[] + { + new SkillOutputComponent("", "", "", SkillOutputComponentAction.None, true) + }), + PrimitiveOutputValue = "", + }; + var result = await client.SetSkillOutputAsync("", evaluationResultOutput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillsetSettings() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillsetSettings("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillsetSettings_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillsetSettings("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetSettings_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillsetSettingsAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetSettings_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillsetSettingsAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetSettings_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var result = await client.GetSkillsetSettingsAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetSkillInvocationStarted() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.SetSkillInvocationStarted(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetSkillInvocationStarted_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.SetSkillInvocationStarted(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetSkillInvocationStarted_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.SetSkillInvocationStartedAsync(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetSkillInvocationStarted_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.SetSkillInvocationStartedAsync(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetSkillInvocationCompleted() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.SetSkillInvocationCompleted(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetSkillInvocationCompleted_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.SetSkillInvocationCompleted(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetSkillInvocationCompleted_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.SetSkillInvocationCompletedAsync(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetSkillInvocationCompleted_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.SetSkillInvocationCompletedAsync(""); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillsetAuthInfo() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillsetAuthInfo("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("authLocation").ToString()); + Console.WriteLine(result.GetProperty("authInfo").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetSkillsetAuthInfo_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = client.GetSkillsetAuthInfo("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("authLocation").ToString()); + Console.WriteLine(result.GetProperty("authInfo").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetAuthInfo_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillsetAuthInfoAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("authLocation").ToString()); + Console.WriteLine(result.GetProperty("authInfo").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetAuthInfo_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + Response response = await client.GetSkillsetAuthInfoAsync("", new RequestContext()); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("authLocation").ToString()); + Console.WriteLine(result.GetProperty("authInfo").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetSkillsetAuthInfo_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var result = await client.GetSkillsetAuthInfoAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTokenCredential() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + scopes = new[] { + "" + }, + tokenCredentialType = "None", + }; + + Response response = client.GetTokenCredential("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("token").ToString()); + Console.WriteLine(result.GetProperty("expiresOn").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetTokenCredential_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + scopes = new[] { + "" + }, + tokenCredentialType = "None", + tenantId = "", + }; + + Response response = client.GetTokenCredential("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("token").ToString()); + Console.WriteLine(result.GetProperty("expiresOn").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTokenCredential_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + scopes = new[] { + "" + }, + tokenCredentialType = "None", + }; + + Response response = await client.GetTokenCredentialAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("token").ToString()); + Console.WriteLine(result.GetProperty("expiresOn").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTokenCredential_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + scopes = new[] { + "" + }, + tokenCredentialType = "None", + tenantId = "", + }; + + Response response = await client.GetTokenCredentialAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("token").ToString()); + Console.WriteLine(result.GetProperty("expiresOn").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetTokenCredential_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var getTokenCredentialRequest = new GetTokenCredentialRequest(new string[] + { + "" + }, TokenCredentialEnum.None) + { + TenantId = "", + }; + var result = await client.GetTokenCredentialAsync("", getTokenCredentialRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetInput() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + }; + + Response response = client.GetInput("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_GetInput_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + defaultValue = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }; + + Response response = client.GetInput("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetInput_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + }; + + Response response = await client.GetInputAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetInput_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + defaultValue = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }; + + Response response = await client.GetInputAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("value").ToString()); + Console.WriteLine(result.GetProperty("valueStoredAsJson").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_GetInput_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var getInputRequest = new GetInputRequest("") + { + DefaultValue = new SkillVariable(true) + { + Type = "", + Value = "", + }, + }; + var result = await client.GetInputAsync("", getInputRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetInput() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + }; + + Response response = client.SetInput("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetInput_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + defaultValue = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }; + + Response response = client.SetInput("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetInput_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + }; + + Response response = await client.SetInputAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetInput_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + inputName = "", + defaultValue = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + skillName = "", + skillInputs = new + { + key = "", + }, + outputLanguage = "", + outputType = "Primitive", + type = "", + value = "", + valueStoredAsJson = true, + }, + }; + + Response response = await client.SetInputAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetInput_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var setInputRequest = new SetInputRequest("") + { + DefaultValue = new SkillVariable(true) + { + Type = "", + Value = "", + }, + }; + var result = await client.SetInputAsync("", setInputRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddSources() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + } + }, + }; + + Response response = client.AddSources("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddSources_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + }; + + Response response = client.AddSources("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSources_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + } + }, + }; + + Response response = await client.AddSourcesAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSources_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + sources = new[] { + new { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + } + }, + }; + + Response response = await client.AddSourcesAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSources_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var addSourcesRequest = new AddSourcesRequest(new SkillSource[] + { + new SkillSource("", "", SkillSourceType.Uri) +{ + SourceSerializedData = "", + } + }); + var result = await client.AddSourcesAsync("", addSourcesRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddSource() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + SkillSource = new + { + displayName = "", + sourceContent = "", + sourceType = "Uri", + }, + }; + + Response response = client.AddSource("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddSource_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + SkillSource = new + { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + }, + }; + + Response response = client.AddSource("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSource_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + SkillSource = new + { + displayName = "", + sourceContent = "", + sourceType = "Uri", + }, + }; + + Response response = await client.AddSourceAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSource_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + SkillSource = new + { + displayName = "", + sourceContent = "", + sourceType = "Uri", + sourceSerializedData = "", + }, + }; + + Response response = await client.AddSourceAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSource_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var addSourceRequest = new AddSourceRequest(new SkillSource("", "", SkillSourceType.Uri) + { + SourceSerializedData = "", + }); + var result = await client.AddSourceAsync("", addSourceRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddSuggestedPrompts() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + }; + + Response response = client.AddSuggestedPrompts("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AddSuggestedPrompts_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + }; + + Response response = client.AddSuggestedPrompts("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSuggestedPrompts_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + }; + + Response response = await client.AddSuggestedPromptsAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSuggestedPrompts_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + suggestedPrompts = new[] { + new { + prompt = "", + } + }, + }; + + Response response = await client.AddSuggestedPromptsAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AddSuggestedPrompts_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var addSuggestedPromptsRequest = new AddSuggestedPromptsRequest(new SuggestedPrompt[] + { + new SuggestedPrompt("") + }); + var result = await client.AddSuggestedPromptsAsync("", addSuggestedPromptsRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetFinalResponseSettings() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + finalResponseBehavior = "", + }; + + Response response = client.SetFinalResponseSettings("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_SetFinalResponseSettings_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + finalResponseBehavior = "", + finalResponseFormat = "", + finalResponsePersona = "", + finalResponseFallback = "", + }; + + Response response = client.SetFinalResponseSettings("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetFinalResponseSettings_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + finalResponseBehavior = "", + }; + + Response response = await client.SetFinalResponseSettingsAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetFinalResponseSettings_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + finalResponseBehavior = "", + finalResponseFormat = "", + finalResponsePersona = "", + finalResponseFallback = "", + }; + + Response response = await client.SetFinalResponseSettingsAsync("", RequestContent.Create(data)); + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_SetFinalResponseSettings_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var setFinalResponseSettingsRequest = new SetFinalResponseSettingsRequest("") + { + FinalResponseFormat = "", + FinalResponsePersona = "", + FinalResponseFallback = "", + }; + var result = await client.SetFinalResponseSettingsAsync("", setFinalResponseSettingsRequest); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateChatCompletion() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + chatCompletionRequest = new + { + Messages = new[] { + new { + Role = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Stop = new[] { + "" + }, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + }; + + Response response = client.CreateChatCompletion("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateChatCompletion_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + deploymentId = "", + chatCompletionRequest = new + { + Messages = new[] { + new { + Content = "", + Role = "", + Name = "", + FunctionCall = new { + Name = "", + Arguments = new { + key = "", + }, + }, + ToolCalls = new[] { + new { + Id = "", + Type = "", + Function = new { + Name = "", + Arguments = "", + }, + } + }, + ToolCallId = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Tools = new[] { + new { + Type = "", + Function = new { + Description = "", + Name = "", + Parameters = new {}, + }, + } + }, + ToolChoice = "", + ParallelToolCalls = true, + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + openAiExecutionContext = new + { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new + { + key = "", + }, + ReportingProperties = new + { + key = "", + }, + }, + }; + + Response response = client.CreateChatCompletion("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Content").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Name").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Name").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Arguments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Type").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Name").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Arguments").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCallId").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateChatCompletion_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + chatCompletionRequest = new + { + Messages = new[] { + new { + Role = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Stop = new[] { + "" + }, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + }; + + Response response = await client.CreateChatCompletionAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateChatCompletion_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + deploymentId = "", + chatCompletionRequest = new + { + Messages = new[] { + new { + Content = "", + Role = "", + Name = "", + FunctionCall = new { + Name = "", + Arguments = new { + key = "", + }, + }, + ToolCalls = new[] { + new { + Id = "", + Type = "", + Function = new { + Name = "", + Arguments = "", + }, + } + }, + ToolCallId = "", + } + }, + Functions = new[] { + new { + Name = "", + Description = "", + Parameters = new { + Type = "", + Properties = new { + key = new { + Type = "", + Description = "", + Enum = new[] { + "" + }, + }, + }, + Required = new[] { + "" + }, + }, + Result = new { + Type = "", + }, + } + }, + FunctionCall = "", + Tools = new[] { + new { + Type = "", + Function = new { + Description = "", + Name = "", + Parameters = new {}, + }, + } + }, + ToolChoice = "", + ParallelToolCalls = true, + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + openAiExecutionContext = new + { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new + { + key = "", + }, + ReportingProperties = new + { + key = "", + }, + }, + }; + + Response response = await client.CreateChatCompletionAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Content").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Role").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("Name").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Name").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("FunctionCall").GetProperty("Arguments").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Type").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Name").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCalls")[0].GetProperty("Function").GetProperty("Arguments").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Message").GetProperty("ToolCallId").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateChatCompletion_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var request = new CreateChatCompletionRequest(new ChatCompletionRequest(new string[] + { + "" + }, null, BinaryData.FromString(""), new Message[] + { + new Message("") +{ + Content = "", + Name = "", + FunctionCall = new FunctionCall("") +{ + Arguments = +{ + ["key"] = "", + }, + }, + ToolCalls = +{ + new ToolCall("", "", new ToolFunctionCall("", "")) + }, + ToolCallId = "", + } + }, new GPTFunction[] + { + new GPTFunction("", "", new FunctionParameter("", new Dictionary +{ + ["key"] = new FunctionParameterProperty("", "", new string[] +{ + "" + }), + }, new string[] +{ + "" + }), new FunctionResult("")) + }, "") + { + Tools = +{ + new Tools("", new FunctionDefinition("", "", BinaryData.FromString(""))) + }, + ToolChoice = "", + ParallelToolCalls = true, + }) + { + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) + { + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, + }; + var result = await client.CreateChatCompletionAsync("", request); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateCompletion() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + completionRequest = new + { + Prompt = "", + Stop = new[] { + "" + }, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + }; + + Response response = client.CreateCompletion("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateCompletion_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + deploymentId = "", + completionRequest = new + { + Prompt = "", + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + openAiExecutionContext = new + { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new + { + key = "", + }, + ReportingProperties = new + { + key = "", + }, + }, + }; + + Response response = client.CreateCompletion("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateCompletion_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + completionRequest = new + { + Prompt = "", + Stop = new[] { + "" + }, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + }; + + Response response = await client.CreateCompletionAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateCompletion_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + deploymentId = "", + completionRequest = new + { + Prompt = "", + MaxTokens = 1234, + Temperature = 123.45d, + TopP = 123.45d, + N = 1234, + Stream = true, + Logprobs = 1234, + Echo = true, + Stop = new[] { + "" + }, + PresencePenalty = 123.45d, + FrequencyPenalty = 123.45d, + BestOf = 1234, + LogitBias = new + { + key = 1234, + }, + ResponseFormat = new { }, + }, + openAiExecutionContext = new + { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new + { + key = "", + }, + ReportingProperties = new + { + key = "", + }, + }, + }; + + Response response = await client.CreateCompletionAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Text").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("LogProbs").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("FinishReason").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterResults").ToString()); + Console.WriteLine(result.GetProperty("Choices")[0].GetProperty("ContentFilterError").ToString()); + Console.WriteLine(result.GetProperty("Id").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Created").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + Console.WriteLine(result.GetProperty("PromptFilterResults")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateCompletion_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var request = new CreateCompletionRequest(new CompletionRequest(new string[] + { + "" + }, null, BinaryData.FromString(""), "")) + { + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) + { + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, + }; + var result = await client.CreateCompletionAsync("", request); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateEmbedding() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + embeddingRequest = new + { + Input = new { }, + }, + }; + + Response response = client.CreateEmbedding("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_CreateEmbedding_AllParameters() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + deploymentId = "", + embeddingRequest = new + { + Input = new { }, + }, + openAiExecutionContext = new + { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new + { + key = "", + }, + ReportingProperties = new + { + key = "", + }, + }, + }; + + Response response = client.CreateEmbedding("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateEmbedding_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + embeddingRequest = new + { + Input = new { }, + }, + }; + + Response response = await client.CreateEmbeddingAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateEmbedding_AllParameters_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var data = new + { + deploymentId = "", + embeddingRequest = new + { + Input = new { }, + }, + openAiExecutionContext = new + { + ApiVersion = "", + Environment = "", + IsGPUProxyEnabled = true, + GpuProcessingGeo = "", + CustomerAllowCrossGeoCompute = true, + EcsAllowCrossGeoCompute = true, + ContentFilterProperties = new + { + key = "", + }, + ReportingProperties = new + { + key = "", + }, + }, + }; + + Response response = await client.CreateEmbeddingAsync("", RequestContent.Create(data)); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Embedding")[0].ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Index").ToString()); + Console.WriteLine(result.GetProperty("Data")[0].GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Model").ToString()); + Console.WriteLine(result.GetProperty("Object").ToString()); + Console.WriteLine(result.GetProperty("Usage").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_CreateEmbedding_Convenience_Async() + { + var endpoint = new Uri(""); + var client = new SkillContextClient(endpoint); + + var request = new CreateEmbeddingRequest(new EmbeddingRequest(BinaryData.FromString(""))) + { + DeploymentId = "", + OpenAiExecutionContext = new AzureOpenAIExecutionContext("", "", true, true, true) + { + GpuProcessingGeo = "", + ContentFilterProperties = +{ + ["key"] = "", + }, + ReportingProperties = +{ + ["key"] = "", + }, + }, + }; + var result = await client.CreateEmbeddingAsync("", request); + } + } +} diff --git a/sdk/securitycopilot/tests/Microsoft.Security.Copilot.SkillsetAuthoring.Tests.csproj b/sdk/securitycopilot/tests/Microsoft.Security.Copilot.SkillsetAuthoring.Tests.csproj new file mode 100644 index 000000000000..7f67e3e4897a --- /dev/null +++ b/sdk/securitycopilot/tests/Microsoft.Security.Copilot.SkillsetAuthoring.Tests.csproj @@ -0,0 +1,25 @@ + + + $(RequiredTargetFrameworks) + + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + + + + +