Skip to content

Commit 6ce98f7

Browse files
authored
.Net: fix: AutorRole.Developer missing (#13310)
1. Why is this change required? AuthorRole.Developer was missing from the ModelDiagnostic.RoleToEventMap configuration. This was causing OpenTelemetry diagnostic to throw exceptions when the Developer role was used 2. What problem does it solve? Fixes the dictionary so exception are no longer occurring 3. What scenario does it contribute to? Enabling open telemetry and using developer messages 4. If it fixes an open issue, please link to the issue here. #13302
1 parent fbdbaab commit 6ce98f7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dotnet/src/InternalUtilities/src/Diagnostics/ModelDiagnostics.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,13 +651,15 @@ private static class ModelDiagnosticsTags
651651
public const string UserMessage = "gen_ai.user.message";
652652
public const string AssistantMessage = "gen_ai.assistant.message";
653653
public const string ToolMessage = "gen_ai.tool.message";
654+
public const string DeveloperMessage = "gen_ai.tool.developer";
654655
public const string Choice = "gen_ai.choice";
655656
public static readonly Dictionary<AuthorRole, string> RoleToEventMap = new()
656657
{
657658
{ AuthorRole.System, SystemMessage },
658659
{ AuthorRole.User, UserMessage },
659660
{ AuthorRole.Assistant, AssistantMessage },
660-
{ AuthorRole.Tool, ToolMessage }
661+
{ AuthorRole.Tool, ToolMessage },
662+
{ AuthorRole.Developer, DeveloperMessage }
661663
};
662664
}
663665
# endregion

0 commit comments

Comments
 (0)