Skip to content

Commit 7913115

Browse files
CopilotJimDaly
andauthored
Fix unresolved xref placeholders in message_mapper.py DocFx output (#242)
* Initial plan * Fix broken cross-reference links in message_mapper.py docstrings Agent-Logs-Url: https://github.com/microsoft/Agent365-python/sessions/87826ea9-9bc3-47b2-9b3b-b03fb3f647c6 Co-authored-by: JimDaly <6353736+JimDaly@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JimDaly <6353736+JimDaly@users.noreply.github.com> Co-authored-by: Jim Daly <jim.daly@microsoft.com>
1 parent d08cf0a commit 7913115

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • libraries
    • microsoft-agents-a365-observability-extensions-agentframework/microsoft_agents_a365/observability/extensions/agentframework
    • microsoft-agents-a365-observability-extensions-openai/microsoft_agents_a365/observability/extensions/openai

libraries/microsoft-agents-a365-observability-extensions-agentframework/microsoft_agents_a365/observability/extensions/agentframework/message_mapper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Agent Framework sets ``gen_ai.input.messages`` / ``gen_ai.output.messages`` as span
77
tags containing JSON arrays of ``{role, parts[{type, content}], finish_reason?}``.
8-
This mapper converts them to :class:`InputMessages` / :class:`OutputMessages`.
8+
This mapper converts them to ``InputMessages`` / ``OutputMessages``.
99
"""
1010

1111
from __future__ import annotations
@@ -49,7 +49,7 @@ def map_input_messages(messages_json: str) -> str | None:
4949
messages_json: The raw JSON string from the span attribute.
5050
5151
Returns:
52-
Serialized :class:`InputMessages` JSON string, or ``None`` if the
52+
Serialized ``InputMessages`` JSON string, or ``None`` if the
5353
input is empty or cannot be parsed.
5454
"""
5555
try:
@@ -83,7 +83,7 @@ def map_output_messages(messages_json: str) -> str | None:
8383
messages_json: The raw JSON string from the span attribute.
8484
8585
Returns:
86-
Serialized :class:`OutputMessages` JSON string, or ``None`` if the
86+
Serialized ``OutputMessages`` JSON string, or ``None`` if the
8787
input is empty or cannot be parsed.
8888
"""
8989
try:
@@ -119,7 +119,7 @@ def map_output_messages(messages_json: str) -> str | None:
119119

120120

121121
def _map_role(role: str | None, default: MessageRole) -> MessageRole:
122-
"""Map a raw role string to a :class:`MessageRole` enum."""
122+
"""Map a raw role string to a ``MessageRole`` enum."""
123123
if not role:
124124
return default
125125
return _ROLE_MAP.get(role.lower(), default)

libraries/microsoft-agents-a365-observability-extensions-openai/microsoft_agents_a365/observability/extensions/openai/message_mapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def map_input_messages(messages_json: str) -> str | None:
5656
messages_json: The raw JSON string from the span attribute.
5757
5858
Returns:
59-
Serialized :class:`InputMessages` JSON string, or ``None`` if the
59+
Serialized ``InputMessages`` JSON string, or ``None`` if the
6060
input is empty or cannot be parsed.
6161
"""
6262
if not messages_json:
@@ -82,7 +82,7 @@ def map_output_messages(messages_json: str) -> str | None:
8282
messages_json: The raw JSON string from the span attribute.
8383
8484
Returns:
85-
Serialized :class:`OutputMessages` JSON string, or ``None`` if the
85+
Serialized ``OutputMessages`` JSON string, or ``None`` if the
8686
input is empty or cannot be parsed.
8787
"""
8888
if not messages_json:

0 commit comments

Comments
 (0)