@@ -962,6 +962,7 @@ def instrument_pydantic_ai(
962962 / ,
963963 * ,
964964 event_mode : Literal ['attributes' , 'logs' ] = 'attributes' ,
965+ include_binary_content : bool | None = None ,
965966 ** kwargs : Any ,
966967 ) -> None : ...
967968
@@ -972,6 +973,7 @@ def instrument_pydantic_ai(
972973 / ,
973974 * ,
974975 event_mode : Literal ['attributes' , 'logs' ] = 'attributes' ,
976+ include_binary_content : bool | None = None ,
975977 ** kwargs : Any ,
976978 ) -> pydantic_ai .models .Model : ...
977979
@@ -981,6 +983,7 @@ def instrument_pydantic_ai(
981983 / ,
982984 * ,
983985 event_mode : Literal ['attributes' , 'logs' ] | None = None ,
986+ include_binary_content : bool | None = None ,
984987 ** kwargs : Any ,
985988 ) -> pydantic_ai .models .Model | None :
986989 """Instrument PydanticAI.
@@ -992,13 +995,19 @@ def instrument_pydantic_ai(
992995 If you pass a model, a new instrumented model will be returned.
993996 event_mode: See the [PydanticAI docs](https://ai.pydantic.dev/logfire/#data-format).
994997 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.
9951000 kwargs: Additional keyword arguments to pass to
9961001 [`InstrumentationSettings`](https://ai.pydantic.dev/api/models/instrumented/#pydantic_ai.models.instrumented.InstrumentationSettings)
9971002 for future compatibility.
9981003 """
9991004 from .integrations .pydantic_ai import instrument_pydantic_ai
10001005
10011006 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+
10021011 return instrument_pydantic_ai (
10031012 self ,
10041013 obj = obj ,
0 commit comments