mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
(fix) ssl changes
This commit is contained in:
parent
de456408aa
commit
2bc516ae2d
2 changed files with 3 additions and 3 deletions
|
@ -160,7 +160,7 @@ class AzureChatCompletion(BaseLLM):
|
||||||
|
|
||||||
async def acompletion(self, api_base: str, data: dict, headers: dict, model_response: ModelResponse):
|
async def acompletion(self, api_base: str, data: dict, headers: dict, model_response: ModelResponse):
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.post(api_base, json=data, headers=headers) as response:
|
async with session.post(api_base, json=data, headers=headers, ssl=False) as response:
|
||||||
response_json = await response.json()
|
response_json = await response.json()
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
raise AzureOpenAIError(status_code=response.status, message=response.text)
|
raise AzureOpenAIError(status_code=response.status, message=response.text)
|
||||||
|
@ -176,7 +176,7 @@ class AzureChatCompletion(BaseLLM):
|
||||||
model_response: ModelResponse,
|
model_response: ModelResponse,
|
||||||
model: str):
|
model: str):
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.post(api_base, json=data, headers=headers) as response:
|
async with session.post(api_base, json=data, headers=headers, ssl=False) as response:
|
||||||
# Check if the request was successful (status code 200)
|
# Check if the request was successful (status code 200)
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
raise AzureOpenAIError(status_code=response.status, message=await response.text())
|
raise AzureOpenAIError(status_code=response.status, message=await response.text())
|
||||||
|
|
|
@ -273,7 +273,7 @@ class OpenAIChatCompletion(BaseLLM):
|
||||||
model_response: ModelResponse,
|
model_response: ModelResponse,
|
||||||
model: str):
|
model: str):
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.post(api_base, json=data, headers=headers) as response:
|
async with session.post(api_base, json=data, headers=headers, ssl=False) as response:
|
||||||
# Check if the request was successful (status code 200)
|
# Check if the request was successful (status code 200)
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
raise OpenAIError(status_code=response.status, message=await response.text())
|
raise OpenAIError(status_code=response.status, message=await response.text())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue