mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(o_series_handler.py): handle async calls
This commit is contained in:
parent
d9c32342fe
commit
16224f8db6
2 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,7 @@ class AzureOpenAIO1ChatCompletion(BaseAzureLLM, OpenAIChatCompletion):
|
||||||
api_base=api_base,
|
api_base=api_base,
|
||||||
api_version=api_version,
|
api_version=api_version,
|
||||||
client=client,
|
client=client,
|
||||||
|
_is_async=acompletion,
|
||||||
)
|
)
|
||||||
return super().completion(
|
return super().completion(
|
||||||
model_response=model_response,
|
model_response=model_response,
|
||||||
|
|
|
@ -868,10 +868,13 @@ class BaseLLMChatTest(ABC):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
@pytest.mark.flaky(retries=3, delay=1)
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_completion_cost(self):
|
async def test_completion_cost(self):
|
||||||
from litellm import completion_cost
|
from litellm import completion_cost
|
||||||
|
|
||||||
|
litellm._turn_on_debug()
|
||||||
|
|
||||||
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
||||||
litellm.model_cost = litellm.get_model_cost_map(url="")
|
litellm.model_cost = litellm.get_model_cost_map(url="")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue