mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
finishing openrouter integration
This commit is contained in:
parent
1fc2abe3d0
commit
abbc93678b
9 changed files with 32 additions and 46 deletions
|
@ -34,9 +34,9 @@ CACHE = None
|
|||
f"{details.get('exception','Exception')}\nRetry in {details['wait']:.1f} seconds."
|
||||
),
|
||||
)
|
||||
def send_with_retries(model, messages, functions, stream):
|
||||
def send_with_retries(model_name, messages, functions, stream):
|
||||
kwargs = dict(
|
||||
model=model,
|
||||
model=model_name,
|
||||
messages=messages,
|
||||
temperature=0,
|
||||
stream=stream,
|
||||
|
@ -72,10 +72,10 @@ def send_with_retries(model, messages, functions, stream):
|
|||
return hash_object, res
|
||||
|
||||
|
||||
def simple_send_with_retries(model, messages):
|
||||
def simple_send_with_retries(model_name, messages):
|
||||
try:
|
||||
_hash, response = send_with_retries(
|
||||
model=model,
|
||||
model_name=model_name,
|
||||
messages=messages,
|
||||
functions=None,
|
||||
stream=False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue