fixed memory leak and added test

This commit is contained in:
Sunny Wan 2025-03-04 18:12:26 -05:00
parent 4c8b4fefc9
commit a3c70a099e
2 changed files with 22 additions and 0 deletions

View file

@ -460,6 +460,7 @@ class OpenAIChatCompletion(BaseLLM):
else:
headers = {}
response = raw_response.parse()
raw_response.http_response.close()
return headers, response
except Exception as e:
if raw_response is not None: