Skip to content

Commit 53084fe

Browse files
fix(tracing): convert tool schema dump from python to json (#195)
* fix(tracing): convert tool schema dump from python to json * model dump json * fix test error
1 parent 0c5b28f commit 53084fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def generate_events(length: int) -> list[Event]:
2828
)
2929
event = Event(
3030
invocation_id=str(uuid.uuid4()),
31-
author="test_agent",
31+
author="user",
3232
content=types.Content(
3333
parts=[types.Part(text=random_chinese)],
3434
role=["user", "model"][i % 2],

veadk/tracing/telemetry/attributes/extractors/llm_attributes_extractors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def llm_gen_ai_request_functions(params: LLMAttributesParams) -> ExtractorRespon
528528
f"gen_ai.request.functions.{idx}.name": tool_instance.name,
529529
f"gen_ai.request.functions.{idx}.description": tool_instance.description,
530530
f"gen_ai.request.functions.{idx}.parameters": str(
531-
tool_instance._get_declaration().parameters.model_dump( # type: ignore
531+
tool_instance._get_declaration().parameters.model_dump_json( # type: ignore
532532
exclude_none=True
533533
)
534534
if tool_instance._get_declaration()

0 commit comments

Comments
 (0)