Skip to content

Commit ccc20f3

Browse files
committed
fix(tracing): convert tool schema dump from python to json
1 parent 0c5b28f commit ccc20f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,8 @@ def llm_gen_ai_request_functions(params: LLMAttributesParams) -> ExtractorRespon
529529
f"gen_ai.request.functions.{idx}.description": tool_instance.description,
530530
f"gen_ai.request.functions.{idx}.parameters": str(
531531
tool_instance._get_declaration().parameters.model_dump( # type: ignore
532-
exclude_none=True
533-
)
532+
exclude_none=True, mode="json"
533+
) # use `json` mode to flatten Enum class. e.g., from `Type.STRING` to `STRING`
534534
if tool_instance._get_declaration()
535535
and tool_instance._get_declaration().parameters # type: ignore
536536
else {}

0 commit comments

Comments
 (0)