mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 19:55: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
|
@lazy_litellm_retry_decorator
|
||||||
def simple_send_with_retries(model_name, messages):
|
def simple_send_with_retries(model_name, messages, extra_headers=None):
|
||||||
try:
|
try:
|
||||||
_hash, response = send_completion(
|
_hash, response = send_completion(
|
||||||
model_name=model_name,
|
model_name=model_name,
|
||||||
messages=messages,
|
messages=messages,
|
||||||
functions=None,
|
functions=None,
|
||||||
stream=False,
|
stream=False,
|
||||||
|
extra_headers=extra_headers,
|
||||||
)
|
)
|
||||||
return response.choices[0].message.content
|
return response.choices[0].message.content
|
||||||
except (AttributeError, litellm.exceptions.BadRequestError):
|
except (AttributeError, litellm.exceptions.BadRequestError):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue