🐫 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: Update KIMI model default URL (#2996)
Xiaotian Jin4e5cb57ba64b
diff --git a/camel/models/moonshot_model.py b/camel/models/moonshot_model.pyindex 42c79663d..ba27e7f47 100644--- a/camel/models/moonshot_model.py+++ b/camel/models/moonshot_model.py@@ -61,7 +61,9 @@ class MoonshotModel(OpenAICompatibleModel):api_key (Optional[str], optional): The API key for authenticating withthe Moonshot service. (default: :obj:`None`)url (Optional[str], optional): The url to the Moonshot service.- (default: :obj:`https://api.moonshot.cn/v1`)+ For Chinese users, use :obj:`https://api.moonshot.cn/v1`.+ For overseas users, the default endpoint will be used.+ (default: :obj:`https://api.moonshot.ai/v1`)token_counter (Optional[BaseTokenCounter], optional): Token counter touse for the model. If not provided, :obj:`OpenAITokenCounter(ModelType.GPT_4)` will be used.@@ -82,7 +84,7 @@ class MoonshotModel(OpenAICompatibleModel):model_type: Union[ModelType, str],model_config_dict: Optional[Dict[str, Any]] = None,api_key: Optional[str] = None,- url: Optional[str] = None,+ url: Optional[str] = "https://api.moonshot.ai/v1",token_counter: Optional[BaseTokenCounter] = None,timeout: Optional[float] = None,max_retries: int = 3,@@ -91,10 +93,7 @@ class MoonshotModel(OpenAICompatibleModel):if model_config_dict is None:model_config_dict = MoonshotConfig().as_dict()api_key = api_key or os.environ.get("MOONSHOT_API_KEY")- url = url or os.environ.get(- "MOONSHOT_API_BASE_URL",- "https://api.moonshot.cn/v1",- )+ url = url or os.environ.get("MOONSHOT_API_BASE_URL")timeout = timeout or float(os.environ.get("MODEL_TIMEOUT", 180))super().__init__(model_type=model_type,