Skip to content

Commit 237311a

Browse files
committed
fix typecheck
Change-Id: I0d416d8396fb973e00d9f5d9a09eb39127b42158 Co-developed-by: Cursor <[email protected]>
1 parent 6889a0e commit 237311a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

util/opentelemetry-util-genai/src/opentelemetry/util/genai/_upload/completion_hook.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,9 @@ def _calculate_ref_path(
172172
if is_system_instructions_hashable(system_instruction):
173173
# Get a hash of the text.
174174
system_instruction_hash = hashlib.sha256(
175-
"\n".join(
176-
str(x.content)
177-
for x in system_instruction # pyright: ignore[reportUnknownMemberType, reportAttributeAccessIssue, reportUnknownArgumentType]
178-
).encode("utf-8"),
175+
"\n".join(x.content for x in system_instruction).encode( # pyright: ignore[reportUnknownMemberType, reportAttributeAccessIssue, reportUnknownArgumentType]
176+
"utf-8"
177+
),
179178
usedforsecurity=False,
180179
).hexdigest()
181180
uuid_str = str(uuid4())

0 commit comments

Comments
 (0)