mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
feat: route additional providers to openai embeddings
This commit is contained in:
parent
a00914cd3e
commit
b49032fc80
2 changed files with 7 additions and 1 deletions
|
|
@ -6225,6 +6225,9 @@ def embedding(
|
|||
or custom_llm_provider == "byteplus"
|
||||
or custom_llm_provider == "digitalocean"
|
||||
or custom_llm_provider == "siliconflow"
|
||||
or custom_llm_provider == "deepinfra"
|
||||
or custom_llm_provider == "nscale"
|
||||
or custom_llm_provider == "novita"
|
||||
or (model in litellm.open_ai_embedding_models and custom_llm_provider is None)
|
||||
):
|
||||
api_base = (
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ import pytest
|
|||
import litellm
|
||||
|
||||
|
||||
@pytest.mark.parametrize("provider", ["byteplus", "digitalocean", "siliconflow"])
|
||||
@pytest.mark.parametrize(
|
||||
"provider",
|
||||
["byteplus", "digitalocean", "siliconflow", "deepinfra", "nscale", "novita"],
|
||||
)
|
||||
def test_openai_compatible_provider_embedding_dispatch(provider):
|
||||
mock_response = MagicMock()
|
||||
mock_response.parse.return_value = MagicMock(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue