openinference-instrumentation-google-adk 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openinference-instrumentation-google-adk
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: OpenInference Google ADK Instrumentation
5
5
  Project-URL: Homepage, https://github.com/Arize-ai/openinference/tree/main/python/instrumentation/openinference-instrumentation-google-adk
6
6
  Author-email: OpenInference Authors <oss@arize.com>
@@ -1,3 +1,4 @@
1
+ import base64
1
2
  import inspect
2
3
  import json
3
4
  import logging
@@ -530,14 +531,11 @@ def bind_args_kwargs(func: Any, *args: Any, **kwargs: Any) -> OrderedDict[str, A
530
531
  return bound.arguments
531
532
 
532
533
 
533
- def _default(obj: Any) -> str:
534
+ def _default(obj: Any) -> Any:
534
535
  from pydantic import BaseModel
535
536
 
536
537
  if isinstance(obj, BaseModel):
537
- return json.dumps(
538
- obj.model_dump(exclude=None),
539
- ensure_ascii=False,
540
- default=str,
541
- )
542
- else:
543
- return str(obj)
538
+ return obj.model_dump(exclude_none=True)
539
+ if isinstance(obj, bytes):
540
+ return base64.b64encode(obj).decode()
541
+ return str(obj)