mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(azure): wrap v1 image route litellm_params in MappingProxyType
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
80fd9970c2
commit
a6e68b1b0e
2 changed files with 4 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ import asyncio
|
|||
import json
|
||||
import time
|
||||
from collections.abc import Callable, Coroutine
|
||||
from types import MappingProxyType
|
||||
from typing import Any, Final
|
||||
|
||||
import httpx
|
||||
|
|
@ -1116,7 +1117,7 @@ class AzureChatCompletion(BaseAzureLLM, BaseLLM):
|
|||
if BaseAzureLLM._is_azure_v1_api_version(api_version):
|
||||
return BaseAzureLLM._get_base_azure_url(
|
||||
api_base=api_base,
|
||||
litellm_params={"api_version": api_version},
|
||||
litellm_params=MappingProxyType({"api_version": api_version}),
|
||||
route="/openai/images/generations",
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from types import MappingProxyType
|
||||
from typing import Final, cast
|
||||
|
||||
import httpx
|
||||
|
|
@ -106,7 +107,7 @@ class AzureImageEditConfig(OpenAIImageEditConfig):
|
|||
if BaseAzureLLM._is_azure_v1_api_version(api_version):
|
||||
return BaseAzureLLM._get_base_azure_url(
|
||||
api_base=api_base,
|
||||
litellm_params={"api_version": api_version},
|
||||
litellm_params=MappingProxyType({"api_version": api_version}),
|
||||
route="/openai/images/edits",
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue