@@ -962,6 +962,7 @@ def instrument_pydantic_ai(
962
962
/ ,
963
963
* ,
964
964
event_mode : Literal ['attributes' , 'logs' ] = 'attributes' ,
965
+ include_binary_content : bool | None = None ,
965
966
** kwargs : Any ,
966
967
) -> None : ...
967
968
@@ -972,6 +973,7 @@ def instrument_pydantic_ai(
972
973
/ ,
973
974
* ,
974
975
event_mode : Literal ['attributes' , 'logs' ] = 'attributes' ,
976
+ include_binary_content : bool | None = None ,
975
977
** kwargs : Any ,
976
978
) -> pydantic_ai .models .Model : ...
977
979
@@ -981,6 +983,7 @@ def instrument_pydantic_ai(
981
983
/ ,
982
984
* ,
983
985
event_mode : Literal ['attributes' , 'logs' ] | None = None ,
986
+ include_binary_content : bool | None = None ,
984
987
** kwargs : Any ,
985
988
) -> pydantic_ai .models .Model | None :
986
989
"""Instrument PydanticAI.
@@ -992,13 +995,19 @@ def instrument_pydantic_ai(
992
995
If you pass a model, a new instrumented model will be returned.
993
996
event_mode: See the [PydanticAI docs](https://ai.pydantic.dev/logfire/#data-format).
994
997
The default is whatever the default is in your version of PydanticAI.
998
+ include_binary_content: Whether to include base64 encoded binary content (e.g. images) in the events.
999
+ On by default. Requires PydanticAI 0.2.5 or newer.
995
1000
kwargs: Additional keyword arguments to pass to
996
1001
[`InstrumentationSettings`](https://ai.pydantic.dev/api/models/instrumented/#pydantic_ai.models.instrumented.InstrumentationSettings)
997
1002
for future compatibility.
998
1003
"""
999
1004
from .integrations .pydantic_ai import instrument_pydantic_ai
1000
1005
1001
1006
self ._warn_if_not_initialized_for_instrumentation ()
1007
+
1008
+ if include_binary_content is not None :
1009
+ kwargs ['include_binary_content' ] = include_binary_content
1010
+
1002
1011
return instrument_pydantic_ai (
1003
1012
self ,
1004
1013
obj = obj ,
0 commit comments