mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 03:05:00 +00:00
feat: Add extra_headers parameter to simple_send_with_retries
This commit is contained in:
parent
9c2bd9d0a5
commit
e81ddcc1a6
1 changed files with 2 additions and 1 deletions
|
@ -86,13 +86,14 @@ def send_completion(
|
|||
|
||||
|
||||
@lazy_litellm_retry_decorator
|
||||
def simple_send_with_retries(model_name, messages):
|
||||
def simple_send_with_retries(model_name, messages, extra_headers=None):
|
||||
try:
|
||||
_hash, response = send_completion(
|
||||
model_name=model_name,
|
||||
messages=messages,
|
||||
functions=None,
|
||||
stream=False,
|
||||
extra_headers=extra_headers,
|
||||
)
|
||||
return response.choices[0].message.content
|
||||
except (AttributeError, litellm.exceptions.BadRequestError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue