Skip to content

Commit 4a19cae

Browse files
committed
fix docstring
1 parent 9a01a73 commit 4a19cae

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

pydantic_ai_slim/pydantic_ai/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ class CachePoint:
628628
"""Type identifier, this is available on all parts as a discriminator."""
629629

630630
ttl: Literal['5m', '1h'] = '5m'
631-
"""The cache time-to-live, either "5m" (5 minutes) or "1h" (1 hour). Check https://docs.claude.com/en/docs/build-with-claude/prompt-caching#1-hour-cache-duration for more information."""
631+
"""The cache time-to-live, either "5m" (5 minutes) or "1h" (1 hour). See https://docs.claude.com/en/docs/build-with-claude/prompt-caching#1-hour-cache-duration for more information."""
632632

633633

634634
MultiModalContent = ImageUrl | AudioUrl | DocumentUrl | VideoUrl | BinaryContent

pydantic_ai_slim/pydantic_ai/models/anthropic.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,24 +161,20 @@ class AnthropicModelSettings(ModelSettings, total=False):
161161
anthropic_cache_tool_definitions_ttl: Literal['5m', '1h']
162162
"""The TTL for tool definitions cache control.
163163
164-
When enabled, the last tool in the `tools` array will have `cache_control` set,
165-
allowing Anthropic to cache tool definitions and reduce costs.
166-
See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching for more information.
164+
See https://docs.claude.com/en/docs/build-with-claude/prompt-caching#1-hour-cache-duration for more information.
167165
"""
168166

169167
anthropic_cache_instructions: bool
170168
"""Whether to add `cache_control` to the last system prompt block.
171169
172170
When enabled, the last system prompt will have `cache_control` set,
173171
allowing Anthropic to cache system instructions and reduce costs.
174-
See https://docs.claude.com/en/docs/build-with-claude/prompt-caching#1-hour-cache-duration for more information.
172+
See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching for more information.
175173
"""
176174

177175
anthropic_cache_instructions_ttl: Literal['5m', '1h']
178176
"""The TTL for system instructions cache control.
179177
180-
When enabled, the last system prompt will have `cache_control` set,
181-
allowing Anthropic to cache system instructions and reduce costs.
182178
See https://docs.claude.com/en/docs/build-with-claude/prompt-caching#1-hour-cache-duration for more information.
183179
"""
184180

0 commit comments

Comments
 (0)