26 references to Throw
Microsoft.Extensions.AI.Evaluation.Safety (26)
CodeVulnerabilityEvaluator.cs (2)
53_ = Throw.IfNull(chatConfiguration); 54_ = Throw.IfNull(modelResponse);
ContentHarmEvaluator.cs (2)
55_ = Throw.IfNull(chatConfiguration); 56_ = Throw.IfNull(modelResponse);
ContentSafetyChatClient.cs (3)
149Throw.ArgumentException(nameof(messages), ErrorMessage); 157Throw.ArgumentException(nameof(messages), ErrorMessage); 173Throw.ArgumentNullException(nameof(_originalChatClient), errorMessage);
ContentSafetyEvaluator.cs (3)
43_ = Throw.IfNull(chatConfiguration); 90_ = Throw.IfNull(contentSafetyServiceChatClient); 91_ = Throw.IfNull(modelResponse);
ContentSafetyServiceConfiguration.cs (7)
129Credential = Throw.IfNull(credential); 130SubscriptionId = Throw.IfNullOrWhitespace(subscriptionId); 131ResourceGroupName = Throw.IfNullOrWhitespace(resourceGroupName); 132ProjectName = Throw.IfNullOrWhitespace(projectName); 171Credential = Throw.IfNull(credential); 172Endpoint = Throw.IfNull(endpoint); 212endpoint: new Uri(Throw.IfNullOrWhitespace(endpointUrl)),
ContentSafetyServiceConfigurationExtensions.cs (2)
38_ = Throw.IfNull(contentSafetyServiceConfiguration); 75_ = Throw.IfNull(contentSafetyServiceConfiguration);
EvaluationMetricExtensions.cs (1)
91Throw.ArgumentException(paramName: nameof(data), message);
GroundednessProEvaluator.cs (2)
54_ = Throw.IfNull(chatConfiguration); 55_ = Throw.IfNull(modelResponse);
ProtectedMaterialEvaluator.cs (2)
73_ = Throw.IfNull(chatConfiguration); 74_ = Throw.IfNull(modelResponse);
UngroundedAttributesEvaluator.cs (2)
58_ = Throw.IfNull(chatConfiguration); 59_ = Throw.IfNull(modelResponse);