Skip to content

Commit aef5ed5

Browse files
committed
fix: AutorRole.Developer missing
AuthorRole.Developer was missing from the ModelDiagnostic.RoleToEventMap configuration. This was causing OpenTelemetry diagnostic to throw exceptions when the Developer role was used
1 parent cc43169 commit aef5ed5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,13 +651,16 @@ 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";
655+
654656
public const string Choice = "gen_ai.choice";
655657
public static readonly Dictionary<AuthorRole, string> RoleToEventMap = new()
656658
{
657659
{ AuthorRole.System, SystemMessage },
658660
{ AuthorRole.User, UserMessage },
659661
{ AuthorRole.Assistant, AssistantMessage },
660-
{ AuthorRole.Tool, ToolMessage }
662+
{ AuthorRole.Tool, ToolMessage },
663+
{ AuthorRole.Developer, DeveloperMessage }
661664
};
662665
}
663666
# endregion

0 commit comments

Comments
 (0)