mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
test fix - azure deprecated azure ai mistral
This commit is contained in:
parent
9b77559ccf
commit
65f8015221
1 changed files with 0 additions and 23 deletions
|
@ -864,29 +864,6 @@ def test_vertex_ai_embedding_completion_cost(caplog):
|
|||
|
||||
# assert False
|
||||
|
||||
|
||||
def test_completion_azure_ai():
|
||||
try:
|
||||
os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
|
||||
litellm.model_cost = litellm.get_model_cost_map(url="")
|
||||
|
||||
litellm.set_verbose = True
|
||||
response = litellm.completion(
|
||||
model="azure_ai/Mistral-large-nmefg",
|
||||
messages=[{"content": "what llm are you", "role": "user"}],
|
||||
max_tokens=15,
|
||||
num_retries=3,
|
||||
api_base=os.getenv("AZURE_AI_MISTRAL_API_BASE"),
|
||||
api_key=os.getenv("AZURE_AI_MISTRAL_API_KEY"),
|
||||
)
|
||||
print(response)
|
||||
|
||||
assert "response_cost" in response._hidden_params
|
||||
assert isinstance(response._hidden_params["response_cost"], float)
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("sync_mode", [True, False])
|
||||
@pytest.mark.asyncio
|
||||
async def test_completion_cost_hidden_params(sync_mode):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue