Skip to content

Commit 8130350

Browse files
authored
fix: pre commit issue with aihubmix model integration (#3358)
1 parent 4cff53b commit 8130350

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

camel/configs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
14-
from .aiml_config import AIML_API_PARAMS, AIMLConfig
1514
from .aihubmix_config import AIHUBMIX_API_PARAMS, AihubMixConfig
15+
from .aiml_config import AIML_API_PARAMS, AIMLConfig
1616
from .amd_config import AMD_API_PARAMS, AMDConfig
1717
from .anthropic_config import ANTHROPIC_API_PARAMS, AnthropicConfig
1818
from .base_config import BaseConfig
@@ -130,4 +130,4 @@
130130
'QIANFAN_API_PARAMS',
131131
'CrynuxConfig',
132132
'CRYNUX_API_PARAMS',
133-
]
133+
]

camel/configs/aihubmix_config.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
1414
from __future__ import annotations
1515

16-
from typing import Dict, Optional, Sequence, Type, Union
17-
18-
from pydantic import BaseModel
16+
from typing import Dict, Optional, Union
1917

2018
from camel.configs.base_config import BaseConfig
2119

@@ -41,7 +39,7 @@ class AihubMixConfig(BaseConfig):
4139
frequency_penalty (float, optional): Number between :obj:`-2.0` and
4240
:obj:`2.0`. Positive values penalize new tokens based on their
4341
existing frequency in the text so far, decreasing the model's
44-
likelihood to repeat the same line verbatim.
42+
likelihood to repeat the same line verbatim.
4543
(default: :obj:`0`)
4644
presence_penalty (float, optional): Number between :obj:`-2.0` and
4745
:obj:`2.0`. Positive values penalize new tokens based on whether
@@ -87,4 +85,4 @@ class AihubMixConfig(BaseConfig):
8785
extra_headers: Optional[Dict[str, str]] = None
8886

8987

90-
AIHUBMIX_API_PARAMS = {param for param in AihubMixConfig.model_fields.keys()}
88+
AIHUBMIX_API_PARAMS = {param for param in AihubMixConfig.model_fields.keys()}

camel/models/model_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import os
1616
from typing import Any, ClassVar, Dict, Optional, Type, Union
1717

18+
from camel.models.aihubmix_model import AihubMixModel
1819
from camel.models.aiml_model import AIMLModel
1920
from camel.models.amd_model import AMDModel
2021
from camel.models.anthropic_model import AnthropicModel
@@ -23,7 +24,6 @@
2324
from camel.models.base_model import BaseModelBackend
2425
from camel.models.cohere_model import CohereModel
2526
from camel.models.cometapi_model import CometAPIModel
26-
from camel.models.aihubmix_model import AihubMixModel
2727
from camel.models.crynux_model import CrynuxModel
2828
from camel.models.deepseek_model import DeepSeekModel
2929
from camel.models.gemini_model import GeminiModel

examples/models/aihubmix_model_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
def test_aihubmix_model() -> None:
2828
r"""Test AIHubMix model using ModelFactory."""
29-
29+
3030
# Set up the model
3131
# You need to set AIHUBMIX_API_KEY in your environment variables
3232
# or directly pass it as api_key parameter
@@ -58,7 +58,7 @@ def test_aihubmix_model() -> None:
5858

5959
def test_aihubmix_with_custom_model() -> None:
6060
r"""Test AIHubMix model with a custom model name."""
61-
61+
6262
# Set up the model
6363
api_key = os.environ.get("AIHUBMIX_API_KEY")
6464
if not api_key:
@@ -90,7 +90,7 @@ def main():
9090
r"""Main function to test AIHubMix models."""
9191
print("Testing AIHubMix models:")
9292
print("=" * 40)
93-
93+
9494
test_aihubmix_model()
9595
print("-" * 40)
9696
test_aihubmix_with_custom_model()

0 commit comments

Comments
 (0)