diff --git a/src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript/components/MetricCard.tsx b/src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript/components/MetricCard.tsx index 5f770298bf4..18476474697 100644 --- a/src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript/components/MetricCard.tsx +++ b/src/Libraries/Microsoft.Extensions.AI.Evaluation.Reporting/TypeScript/components/MetricCard.tsx @@ -242,9 +242,14 @@ export const MetricDisplay = ({ metric }: { metric: MetricWithNoValue | NumericM const classes = useCardStyles(); const { fg, bg } = useCardColors(metric.interpretation); - const pillClass = mergeClasses( - bg, - classes.metricPill, + const pillClass = mergeClasses(bg, classes.metricPill); + const valueClass = mergeClasses(fg, classes.metricValueText); + + return ( + +
+ {metricValue} +
+
); - return (
{metricValue}
); }; diff --git a/src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyChatClient.cs b/src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyChatClient.cs index a8c1ba889d2..60d87cf700d 100644 --- a/src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyChatClient.cs +++ b/src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyChatClient.cs @@ -20,7 +20,8 @@ namespace Microsoft.Extensions.AI.Evaluation.Safety; internal sealed class ContentSafetyChatClient : IChatClient { - private const string Moniker = "Azure AI Foundry Evaluation"; + private const string ProviderName = "azure.ai.foundry"; + private const string ModelId = $"{ProviderName}.evaluation"; private readonly ContentSafetyService _service; private readonly IChatClient? _originalChatClient; @@ -35,38 +36,14 @@ public ContentSafetyChatClient( ChatClientMetadata? originalMetadata = _originalChatClient?.GetService(); - string providerName; - Uri? providerUri = originalMetadata?.ProviderUri; - - if (contentSafetyServiceConfiguration.IsHubBasedProject) - { - providerName = - $"{Moniker} (" + - $"Subscription: {contentSafetyServiceConfiguration.SubscriptionId}, " + - $"Resource Group: {contentSafetyServiceConfiguration.ResourceGroupName}, " + - $"Project: {contentSafetyServiceConfiguration.ProjectName})"; - } - else - { - providerName = $"{Moniker} (Endpoint: {contentSafetyServiceConfiguration.Endpoint})"; - providerUri = contentSafetyServiceConfiguration.Endpoint; - } - + string providerName = ProviderName; if (originalMetadata?.ProviderName is string originalProviderName && !string.IsNullOrWhiteSpace(originalProviderName)) { providerName = $"{providerName}; {originalProviderName}"; } - string modelId = Moniker; - - if (originalMetadata?.DefaultModelId is string originalModelId && - !string.IsNullOrWhiteSpace(originalModelId)) - { - modelId = $"{modelId}; {originalModelId}"; - } - - _metadata = new ChatClientMetadata(providerName, providerUri, modelId); + _metadata = new ChatClientMetadata(providerName, defaultModelId: ModelId); } public async Task GetResponseAsync( @@ -88,7 +65,7 @@ await _service.AnnotateAsync( return new ChatResponse(new ChatMessage(ChatRole.Assistant, annotationResult)) { - ModelId = Moniker + ModelId = ModelId }; } else @@ -121,7 +98,7 @@ await _service.AnnotateAsync( yield return new ChatResponseUpdate(ChatRole.Assistant, annotationResult) { - ModelId = Moniker + ModelId = ModelId }; } else