mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
remove useless mapping
This commit is contained in:
parent
d3823622e9
commit
ea4b5d18a6
3 changed files with 4 additions and 7 deletions
|
@ -394,6 +394,7 @@ together_ai_models: List = [
|
|||
"WizardLM/WizardLM-70B-V1.0",
|
||||
] # supports all together ai models, just pass in the model id e.g. completion(model="together_computer/replit_code_3b",...)
|
||||
|
||||
|
||||
baseten_models: List = [
|
||||
"qvv0xeq",
|
||||
"q841o8w",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
Translates from OpenAI's `/v1/embeddings` to BitdeerAI's `/v1/embeddings`
|
||||
"""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
class BitdeerAIEmbeddingConfig:
|
||||
|
@ -17,3 +17,4 @@ class BitdeerAIEmbeddingConfig:
|
|||
drop_params: Optional[dict] = None,
|
||||
) -> dict:
|
||||
return optional_params
|
||||
"""
|
|
@ -21,14 +21,13 @@ class TestBitdeerAIEmbeddingConfig:
|
|||
assert len(supported_params) == 0, "Expected empty list"
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"non_default_params, optional_params, model, drop_params, expected",
|
||||
"non_default_params, optional_params, model, expected",
|
||||
[
|
||||
# 基础测试:直接返回 optional_params
|
||||
(
|
||||
{"temperature": 0.5},
|
||||
{"input": "test text", "model": "bitdeerai/test"},
|
||||
"model",
|
||||
{"drop": "this"},
|
||||
{"input": "test text", "model": "bitdeerai/test"},
|
||||
),
|
||||
# 测试无 optional_params(空字典)
|
||||
|
@ -36,7 +35,6 @@ class TestBitdeerAIEmbeddingConfig:
|
|||
{},
|
||||
{},
|
||||
"model",
|
||||
None,
|
||||
{},
|
||||
),
|
||||
# 测试非默认参数与 model 的存在不影响结果
|
||||
|
@ -44,7 +42,6 @@ class TestBitdeerAIEmbeddingConfig:
|
|||
{"user": "test_user"},
|
||||
{"input": "another text"},
|
||||
"another_model",
|
||||
{"unknown_param": "value"},
|
||||
{"input": "another text"},
|
||||
),
|
||||
],
|
||||
|
@ -54,7 +51,6 @@ class TestBitdeerAIEmbeddingConfig:
|
|||
non_default_params,
|
||||
optional_params,
|
||||
model,
|
||||
drop_params,
|
||||
expected,
|
||||
):
|
||||
"""验证 map_openai_params 正确返回 optional_params(直通)"""
|
||||
|
@ -62,6 +58,5 @@ class TestBitdeerAIEmbeddingConfig:
|
|||
non_default_params,
|
||||
optional_params,
|
||||
model,
|
||||
drop_params=drop_params,
|
||||
)
|
||||
assert result == expected, f"Expected {expected}, got {result}"
|
Loading…
Add table
Add a link
Reference in a new issue