Skip to content

Commit ecdbbc8

Browse files
committed
docs: update README to reflect privacy_mode from client
1 parent e0be487 commit ecdbbc8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

posthog/ai/pydantic_ai/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ result = await agent.run("What's the weather in San Francisco?")
4040
instrument_pydantic_ai(
4141
client=posthog, # PostHog client instance
4242
distinct_id="user_123", # User identifier for events
43-
privacy_mode=False, # Set True to exclude message content
4443
properties={ # Additional properties for all events
4544
"$ai_session_id": "session_abc",
4645
},
@@ -51,13 +50,15 @@ instrument_pydantic_ai(
5150
)
5251
```
5352

53+
Privacy mode is inherited from the client - set `privacy_mode=True` when creating your PostHog client to exclude message content.
54+
5455
## What Gets Captured
5556

5657
### Model Calls (`$ai_generation` events)
5758

5859
Every LLM API call creates an event with:
5960
- Model name and provider
60-
- Input/output messages (unless `privacy_mode=True`)
61+
- Input/output messages (unless privacy mode is enabled on the client)
6162
- Token usage (input, output)
6263
- Latency
6364
- Error status

0 commit comments

Comments
 (0)