The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
add testing for cohere embeddings
Ishaan Jaffdf024fbbbc20
diff --git a/litellm/tests/test_embedding.py b/litellm/tests/test_embedding.pyindex 9c1e4aa2cd6..31268395f14 100644--- a/litellm/tests/test_embedding.py+++ b/litellm/tests/test_embedding.py@@ -282,19 +282,19 @@ async def test_cohere_embedding(sync_mode):# test_cohere_embedding()-def test_cohere_embedding3():[email protected]("custom_llm_provider", ["cohere", "cohere_chat"])+async def test_cohere_embedding3(custom_llm_provider):try:litellm.set_verbose = True- response = embedding(- model="embed-english-v3.0",+ response = await litellm.aembedding(+ model=f"{custom_llm_provider}/embed-english-v3.0",input=["good morning from litellm", "this is another item"],+ timeout=None,+ max_retries=0,)print(f"response:", response)- custom_llm_provider = response._hidden_params["custom_llm_provider"]-- assert custom_llm_provider == "cohere"-except Exception as e:pytest.fail(f"Error occurred: {e}")