We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5472d30 commit 6667b86Copy full SHA for 6667b86
src/polar_sdk/ingestion/strategies/pydantic_ai.py
@@ -28,6 +28,10 @@ def ingest( # pylint: disable=W
28
:param metadata: Extra metadata to include with the event.
29
"""
30
usage = result.usage()
31
+ additional_metadata: dict[str, Any] = {
32
+ **self._metadata,
33
+ **metadata,
34
+ }
35
self._ingestion.ingest(
36
{
37
"name": self.event_name,
@@ -37,8 +41,7 @@ def ingest( # pylint: disable=W
41
"response_tokens": usage.response_tokens or 0,
38
42
"total_tokens": usage.total_tokens or 0,
39
43
"requests": usage.requests or 0,
40
- **self._metadata,
- **metadata,
44
+ **additional_metadata,
45
},
46
}
47
)
0 commit comments