Skip to content

Commit 2ed2289

Browse files
remove unused attribute
1 parent ccdb584 commit 2ed2289

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/inference_scope.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,6 @@ def record_output_tokens(self, output_tokens: int) -> None:
121121
"""
122122
self.set_tag_maybe(GEN_AI_USAGE_OUTPUT_TOKENS_KEY, str(output_tokens))
123123

124-
def record_response_id(self, response_id: str) -> None:
125-
"""Records the response id for telemetry tracking.
126-
127-
Args:
128-
response_id: Response ID to record
129-
"""
130-
if response_id:
131-
self.set_tag_maybe(GEN_AI_RESPONSE_ID_KEY, response_id)
132-
133124
def record_finish_reasons(self, finish_reasons: List[str]) -> None:
134125
"""Records the finish reasons for telemetry tracking.
135126

tests/observability/core/test_inference_scope.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ def test_inference_scope_context_manager(self):
129129
if hasattr(scope, "record_output_tokens"):
130130
scope.record_output_tokens(60)
131131

132-
if hasattr(scope, "record_response_id"):
133-
scope.record_response_id("new-resp-456")
134-
135132
if hasattr(scope, "record_finish_reasons"):
136133
scope.record_finish_reasons(["stop", "length"])
137134

@@ -207,20 +204,6 @@ def test_record_output_tokens(self):
207204
# Should not raise an exception
208205
self.assertTrue(hasattr(scope, "record_output_tokens"))
209206

210-
def test_record_response_id(self):
211-
"""Test record_response_id method."""
212-
details = InferenceCallDetails(
213-
operationName=InferenceOperationType.CHAT, model="gpt-4", providerName="openai"
214-
)
215-
216-
scope = InferenceScope.start(details, self.agent_details, self.tenant_details)
217-
218-
if scope is not None:
219-
# Test recording response ID
220-
scope.record_response_id("resp-123456")
221-
# Should not raise an exception
222-
self.assertTrue(hasattr(scope, "record_response_id"))
223-
224207
def test_record_finish_reasons(self):
225208
"""Test record_finish_reasons method."""
226209
details = InferenceCallDetails(

0 commit comments

Comments
 (0)