remove useless mapping

This commit is contained in:
Yujie Zhu 2025-04-23 13:38:05 +08:00
parent d3823622e9
commit ea4b5d18a6
3 changed files with 4 additions and 7 deletions

View file

@ -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",

View file

@ -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
"""

View file

@ -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}"