🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
fix: pre commit issue with aihubmix model integration (#3358)
Wendong-Fan81303504b896
diff --git a/camel/configs/__init__.py b/camel/configs/__init__.pyindex ffb7bc451..f6856ab5b 100644--- a/camel/configs/__init__.py+++ b/camel/configs/__init__.py@@ -11,8 +11,8 @@# See the License for the specific language governing permissions and# limitations under the License.# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========-from .aiml_config import AIML_API_PARAMS, AIMLConfigfrom .aihubmix_config import AIHUBMIX_API_PARAMS, AihubMixConfig+from .aiml_config import AIML_API_PARAMS, AIMLConfigfrom .amd_config import AMD_API_PARAMS, AMDConfigfrom .anthropic_config import ANTHROPIC_API_PARAMS, AnthropicConfigfrom .base_config import BaseConfig@@ -130,4 +130,4 @@ __all__ = ['QIANFAN_API_PARAMS','CrynuxConfig','CRYNUX_API_PARAMS',-]\ No newline at end of file+]diff --git a/camel/configs/aihubmix_config.py b/camel/configs/aihubmix_config.pyindex 23d4005f3..4dabd5c9d 100644--- a/camel/configs/aihubmix_config.py+++ b/camel/configs/aihubmix_config.py@@ -13,9 +13,7 @@# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========from __future__ import annotations-from typing import Dict, Optional, Sequence, Type, Union--from pydantic import BaseModel+from typing import Dict, Optional, Unionfrom camel.configs.base_config import BaseConfig@@ -41,7 +39,7 @@ class AihubMixConfig(BaseConfig):frequency_penalty (float, optional): Number between :obj:`-2.0` and:obj:`2.0`. Positive values penalize new tokens based on theirexisting frequency in the text so far, decreasing the model's- likelihood to repeat the same line verbatim.+ likelihood to repeat the same line verbatim.(default: :obj:`0`)presence_penalty (float, optional): Number between :obj:`-2.0` and:obj:`2.0`. Positive values penalize new tokens based on whether@@ -87,4 +85,4 @@ class AihubMixConfig(BaseConfig):extra_headers: Optional[Dict[str, str]] = None-AIHUBMIX_API_PARAMS = {param for param in AihubMixConfig.model_fields.keys()}\ No newline at end of file+AIHUBMIX_API_PARAMS = {param for param in AihubMixConfig.model_fields.keys()}diff --git a/camel/models/model_factory.py b/camel/models/model_factory.pyindex f2f83ed15..736052324 100644--- a/camel/models/model_factory.py+++ b/camel/models/model_factory.py@@ -15,6 +15,7 @@ import jsonimport osfrom typing import Any, ClassVar, Dict, Optional, Type, Union+from camel.models.aihubmix_model import AihubMixModelfrom camel.models.aiml_model import AIMLModelfrom camel.models.amd_model import AMDModelfrom camel.models.anthropic_model import AnthropicModel@@ -23,7 +24,6 @@ from camel.models.azure_openai_model import AzureOpenAIModelfrom camel.models.base_model import BaseModelBackendfrom camel.models.cohere_model import CohereModelfrom camel.models.cometapi_model import CometAPIModel-from camel.models.aihubmix_model import AihubMixModelfrom camel.models.crynux_model import CrynuxModelfrom camel.models.deepseek_model import DeepSeekModelfrom camel.models.gemini_model import GeminiModeldiff --git a/examples/models/aihubmix_model_example.py b/examples/models/aihubmix_model_example.pyindex 430e084fd..43e816d96 100644--- a/examples/models/aihubmix_model_example.py+++ b/examples/models/aihubmix_model_example.py@@ -26,7 +26,7 @@ from camel.types import ModelPlatformType, ModelTypedef test_aihubmix_model() -> None:r"""Test AIHubMix model using ModelFactory."""-+# Set up the model# You need to set AIHUBMIX_API_KEY in your environment variables# or directly pass it as api_key parameter@@ -58,7 +58,7 @@ def test_aihubmix_model() -> None:def test_aihubmix_with_custom_model() -> None:r"""Test AIHubMix model with a custom model name."""-+# Set up the modelapi_key = os.environ.get("AIHUBMIX_API_KEY")if not api_key:@@ -90,7 +90,7 @@ def main():r"""Main function to test AIHubMix models."""print("Testing AIHubMix models:")print("=" * 40)-+test_aihubmix_model()print("-" * 40)test_aihubmix_with_custom_model()