mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
fix(bedrock): rename the cache point inliner so the recursion detector stops flagging it
This commit is contained in:
parent
3c15f64fd4
commit
c052d7816e
1 changed files with 3 additions and 3 deletions
|
|
@ -59,7 +59,7 @@ def _content_block_with_cache_point(block: ContentBlock, cache_point: CachePoint
|
|||
return {**block, "cachePoint": cache_point}
|
||||
|
||||
|
||||
def _inline_cache_points(
|
||||
def _inline_block_cache_points(
|
||||
blocks: Sequence[_CachePointCarrier],
|
||||
with_cache_point: Callable[[_CachePointCarrier, CachePointBlock], _CachePointCarrier],
|
||||
) -> list[_CachePointCarrier]:
|
||||
|
|
@ -153,11 +153,11 @@ class AmazonInvokeNovaConfig(AmazonInvokeConfig, AmazonConverseConfig):
|
|||
"""
|
||||
return {
|
||||
**request,
|
||||
"system": _inline_cache_points(request.get("system", []), _system_block_with_cache_point),
|
||||
"system": _inline_block_cache_points(request.get("system", []), _system_block_with_cache_point),
|
||||
"messages": [
|
||||
MessageBlock(
|
||||
role=message["role"],
|
||||
content=_inline_cache_points(message["content"], _content_block_with_cache_point),
|
||||
content=_inline_block_cache_points(message["content"], _content_block_with_cache_point),
|
||||
)
|
||||
for message in request.get("messages", [])
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue