mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 12:45:00 +00:00
feat: add num_cache_warming_pings arg to __init__
This commit is contained in:
parent
8cec00eb9c
commit
0b2d0004b6
1 changed files with 3 additions and 1 deletions
|
@ -90,6 +90,7 @@ class Coder:
|
||||||
message_tokens_received = 0
|
message_tokens_received = 0
|
||||||
add_cache_headers = False
|
add_cache_headers = False
|
||||||
cache_warming_thread = None
|
cache_warming_thread = None
|
||||||
|
num_cache_warming_pings = 5
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(
|
def create(
|
||||||
|
@ -252,6 +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,
|
||||||
):
|
):
|
||||||
self.commit_before_message = []
|
self.commit_before_message = []
|
||||||
self.aider_commit_hashes = set()
|
self.aider_commit_hashes = set()
|
||||||
|
@ -992,7 +994,7 @@ class Coder:
|
||||||
self.cache_warming_thread.cancel()
|
self.cache_warming_thread.cancel()
|
||||||
|
|
||||||
def warm_cache_worker():
|
def warm_cache_worker():
|
||||||
for _ in range(5):
|
for _ in range(self.num_cache_warming_pings):
|
||||||
time.sleep(10) # 290 == 4 minutes and 50 seconds
|
time.sleep(10) # 290 == 4 minutes and 50 seconds
|
||||||
try:
|
try:
|
||||||
completion = litellm.completion(
|
completion = litellm.completion(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue