mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(test) use os.environ/ for azure vision enhance
This commit is contained in:
parent
d80ae8b9bb
commit
4f503dc736
2 changed files with 42 additions and 8 deletions
|
@ -337,6 +337,15 @@ def test_router_init_gpt_4_vision_enhancements():
|
|||
"model": "azure/gpt-4-vision",
|
||||
"api_key": os.getenv("AZURE_API_KEY"),
|
||||
"base_url": "https://gpt-4-vision-resource.openai.azure.com/openai/deployments/gpt-4-vision/extensions/",
|
||||
"dataSources": [
|
||||
{
|
||||
"type": "AzureComputerVision",
|
||||
"parameters": {
|
||||
"endpoint": "os.environ/AZURE_VISION_ENHANCE_ENDPOINT",
|
||||
"key": "os.environ/AZURE_VISION_ENHANCE_KEY",
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
}
|
||||
]
|
||||
|
@ -351,6 +360,20 @@ def test_router_init_gpt_4_vision_enhancements():
|
|||
== "https://gpt-4-vision-resource.openai.azure.com/openai/deployments/gpt-4-vision/extensions/"
|
||||
) # set in env
|
||||
|
||||
assert (
|
||||
router.model_list[0]["litellm_params"]["dataSources"][0]["parameters"][
|
||||
"endpoint"
|
||||
]
|
||||
== os.environ["AZURE_VISION_ENHANCE_ENDPOINT"]
|
||||
)
|
||||
|
||||
assert (
|
||||
router.model_list[0]["litellm_params"]["dataSources"][0]["parameters"][
|
||||
"key"
|
||||
]
|
||||
== os.environ["AZURE_VISION_ENHANCE_KEY"]
|
||||
)
|
||||
|
||||
azure_client = router._get_client(
|
||||
deployment=router.model_list[0],
|
||||
kwargs={"stream": True, "model": "gpt-4-vision-enhancements"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue