docs: clarify Dapr consistency import in sessions docs#3631
Conversation
- Clarify that `DAPR_CONSISTENCY_STRONG` comes from the Dapr SDK in the Dapr session example notes. - This removes ambiguity for readers copying the snippet and makes the example easier to run without guesswork.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2346e6f38c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| - `from_address(...)` creates and owns the Dapr client for you. If your app already manages one, construct `DaprSession(...)` directly with `dapr_client=...`. | ||
| - Pass `ttl=...` to let the backing state store expire old session data automatically when the store supports TTL. | ||
| - Pass `consistency=DAPR_CONSISTENCY_STRONG` when you need stronger read-after-write guarantees. | ||
| - Pass `consistency=DAPR_CONSISTENCY_STRONG` (imported from the Dapr SDK) when you need stronger read-after-write guarantees. |
There was a problem hiding this comment.
Point readers to the Agents SDK constant
This parenthetical sends users to the wrong package: DAPR_CONSISTENCY_STRONG is defined by the Agents SDK in src/agents/extensions/memory/dapr_session.py and re-exported from agents.extensions.memory, while the nearby snippet imports only DaprSession. When someone adds this option and follows “imported from the Dapr SDK,” they will either leave the name undefined or try an import from dapr that does not provide this Agents-specific constant; please document from agents.extensions.memory import DAPR_CONSISTENCY_STRONG instead.
Useful? React with 👍 / 👎.
- Update the Dapr session notes to point readers to the Agents SDK constant for `DAPR_CONSISTENCY_STRONG`. - This avoids sending users toward the wrong package and makes the snippet clearer for anyone copying the example into their own code.
Clarify that
DAPR_CONSISTENCY_STRONGcomes from the Dapr SDK in the Dapr session example notes.This removes ambiguity for readers copying the snippet and makes the example easier to run without guesswork.