mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
refactor: Improve timeout handling in litellm.completion method
This commit is contained in:
parent
685e63b9da
commit
23d74040ed
1 changed files with 3 additions and 2 deletions
|
@ -601,8 +601,9 @@ class Model(ModelSettings):
|
|||
# dump(kwargs)
|
||||
|
||||
hash_object = hashlib.sha1(key)
|
||||
# don't pass timeout here, add it to kwargs (if not already present) ai!
|
||||
res = litellm.completion(timeout=request_timeout, **kwargs)
|
||||
if 'timeout' not in kwargs:
|
||||
kwargs['timeout'] = request_timeout
|
||||
res = litellm.completion(**kwargs)
|
||||
return hash_object, res
|
||||
|
||||
def remove_reasoning_content(self, res):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue