mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
(fix) using base_url Azure
This commit is contained in:
parent
7178d01c8f
commit
5a8a5fa0fd
2 changed files with 3 additions and 2 deletions
|
|
@ -106,7 +106,8 @@ def select_azure_base_url_or_endpoint(azure_client_params: dict):
|
|||
# }
|
||||
azure_endpoint = azure_client_params.get("azure_endpoint", None)
|
||||
if azure_endpoint is not None:
|
||||
if "/openai" in azure_endpoint:
|
||||
# see : https://github.com/openai/openai-python/blob/3d61ed42aba652b547029095a7eb269ad4e1e957/src/openai/lib/azure.py#L192
|
||||
if "/openai/deployments" in azure_endpoint:
|
||||
# this is base_url, not an azure_endpoint
|
||||
azure_client_params["base_url"] = azure_endpoint
|
||||
azure_client_params.pop("azure_endpoint")
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ def test_completion_azure_gpt4_vision():
|
|||
"type": "AzureComputerVision",
|
||||
"parameters": {
|
||||
"endpoint": "https://gpt-4-vision-enhancement.cognitiveservices.azure.com/",
|
||||
"key": "efcd55c055ca47e08f61a8c54ba1707b",
|
||||
"key": os.environ["AZURE_VISION_ENHANCE_KEY"],
|
||||
},
|
||||
}
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue