mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
fix: Reduce number of cache warming pings to 0
This commit is contained in:
parent
a17b9601c5
commit
8319df775e
1 changed files with 4 additions and 2 deletions
|
@ -253,7 +253,7 @@ class Coder:
|
||||||
total_cost=0.0,
|
total_cost=0.0,
|
||||||
map_refresh="auto",
|
map_refresh="auto",
|
||||||
cache_prompts=False,
|
cache_prompts=False,
|
||||||
num_cache_warming_pings=5,
|
num_cache_warming_pings=0,
|
||||||
):
|
):
|
||||||
self.commit_before_message = []
|
self.commit_before_message = []
|
||||||
self.aider_commit_hashes = set()
|
self.aider_commit_hashes = set()
|
||||||
|
@ -989,13 +989,15 @@ class Coder:
|
||||||
def warm_cache(self, chunks):
|
def warm_cache(self, chunks):
|
||||||
if not self.add_cache_headers:
|
if not self.add_cache_headers:
|
||||||
return
|
return
|
||||||
|
if not self.num_cache_warming_pings:
|
||||||
|
return
|
||||||
|
|
||||||
if self.cache_warming_thread and self.cache_warming_thread.is_alive():
|
if self.cache_warming_thread and self.cache_warming_thread.is_alive():
|
||||||
self.cache_warming_thread.cancel()
|
self.cache_warming_thread.cancel()
|
||||||
|
|
||||||
def warm_cache_worker():
|
def warm_cache_worker():
|
||||||
for _ in range(self.num_cache_warming_pings):
|
for _ in range(self.num_cache_warming_pings):
|
||||||
time.sleep(10) # 290 == 4 minutes and 50 seconds
|
time.sleep(20) # 290 == 4 minutes and 50 seconds
|
||||||
try:
|
try:
|
||||||
completion = litellm.completion(
|
completion = litellm.completion(
|
||||||
model=self.main_model.name,
|
model=self.main_model.name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue