Skip to content

Commit

Permalink
fix truncation logic (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
x5a authored Nov 23, 2024
1 parent 7360c9d commit c4b5d1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions computer-use-demo/computer_use_demo/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ async def sampling_loop(
if enable_prompt_caching:
betas.append(PROMPT_CACHING_BETA_FLAG)
_inject_prompt_caching(messages)
# Is it ever worth it to bust the cache with prompt caching?
if image_truncation_threshold:
image_truncation_threshold = 0
# Because cached reads are 10% of the price, we don't think it's
# ever sensible to break the cache by truncating images
only_n_most_recent_images = 0
system["cache_control"] = {"type": "ephemeral"}

if only_n_most_recent_images:
Expand Down

0 comments on commit c4b5d1e

Please sign in to comment.