openinference-instrumentation-google-adk 0.1.2__tar.gz → 0.1.4__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.2
3
+ Version: 0.1.4
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>
@@ -357,7 +357,10 @@ def stop_on_exception(
357
357
  def _get_attributes_from_generate_content_config(
358
358
  obj: types.GenerateContentConfig,
359
359
  ) -> Iterator[tuple[str, AttributeValue]]:
360
- yield SpanAttributes.LLM_INVOCATION_PARAMETERS, obj.model_dump_json(exclude_none=True)
360
+ yield (
361
+ SpanAttributes.LLM_INVOCATION_PARAMETERS,
362
+ obj.model_dump_json(exclude_none=True, fallback=_default),
363
+ )
361
364
 
362
365
 
363
366
  @stop_on_exception
@@ -536,6 +539,8 @@ def _default(obj: Any) -> Any:
536
539
 
537
540
  if isinstance(obj, BaseModel):
538
541
  return obj.model_dump(exclude_none=True)
542
+ if inspect.isclass(obj) and issubclass(obj, BaseModel):
543
+ return obj.model_json_schema()
539
544
  if isinstance(obj, bytes):
540
545
  return base64.b64encode(obj).decode()
541
546
  return str(obj)