🐫 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
chore: update gemini model (#2721)
Wendong-Fanf6f6f84843f7
diff --git a/camel/types/enums.py b/camel/types/enums.pyindex 1dbf1a75d..c19b35ed3 100644--- a/camel/types/enums.py+++ b/camel/types/enums.py@@ -185,8 +185,8 @@ class ModelType(UnifiedModelType, Enum):NVIDIA_LLAMA3_3_70B_INSTRUCT = "meta/llama-3.3-70b-instruct"# Gemini models- GEMINI_2_5_FLASH_PREVIEW = "gemini-2.5-flash-preview-04-17"- GEMINI_2_5_PRO_PREVIEW = "gemini-2.5-pro-preview-06-05"+ GEMINI_2_5_FLASH = "gemini-2.5-flash"+ GEMINI_2_5_PRO = "gemini-2.5-pro"GEMINI_2_0_FLASH = "gemini-2.0-flash"GEMINI_2_0_FLASH_EXP = "gemini-2.0-flash-exp"GEMINI_2_0_FLASH_THINKING = "gemini-2.0-flash-thinking-exp"@@ -674,8 +674,8 @@ class ModelType(UnifiedModelType, Enum):bool: Whether this type of models is gemini."""return self in {- ModelType.GEMINI_2_5_FLASH_PREVIEW,- ModelType.GEMINI_2_5_PRO_PREVIEW,+ ModelType.GEMINI_2_5_FLASH,+ ModelType.GEMINI_2_5_PRO,ModelType.GEMINI_2_0_FLASH,ModelType.GEMINI_2_0_FLASH_EXP,ModelType.GEMINI_2_0_FLASH_THINKING,@@ -1278,8 +1278,8 @@ class ModelType(UnifiedModelType, Enum):}:return 512_000elif self in {- ModelType.GEMINI_2_5_FLASH_PREVIEW,- ModelType.GEMINI_2_5_PRO_PREVIEW,+ ModelType.GEMINI_2_5_FLASH,+ ModelType.GEMINI_2_5_PRO,ModelType.GEMINI_2_0_FLASH,ModelType.GEMINI_2_0_FLASH_EXP,ModelType.GEMINI_2_0_FLASH_THINKING,diff --git a/docs/key_modules/models.md b/docs/key_modules/models.mdindex 5b6bde064..871aa1728 100644--- a/docs/key_modules/models.md+++ b/docs/key_modules/models.md@@ -121,7 +121,7 @@ Integrate your favorite models into CAMEL-AI with straightforward Python calls.model = ModelFactory.create(model_platform=ModelPlatformType.GEMINI,- model_type=ModelType.GEMINI_2_5_PRO_PREVIEW,+ model_type=ModelType.GEMINI_2_5_PRO,model_config_dict=GeminiConfig(temperature=0.2).as_dict(),)diff --git a/examples/models/gemini_model_example.py b/examples/models/gemini_model_example.pyindex c780225c7..0cc178358 100644--- a/examples/models/gemini_model_example.py+++ b/examples/models/gemini_model_example.py@@ -28,7 +28,7 @@ user_msg = """Say hi to CAMEL AI, one open-source community dedicated to the# Example of using the gemini-2.5-pro-preview-06-05 modelmodel_2_5_pro_pre = ModelFactory.create(model_platform=ModelPlatformType.GEMINI,- model_type=ModelType.GEMINI_2_5_PRO_PREVIEW,+ model_type=ModelType.GEMINI_2_5_PRO,model_config_dict=GeminiConfig(temperature=0.2).as_dict(),)camel_agent_pro = ChatAgent(system_message=sys_msg, model=model_2_5_pro_pre)diff --git a/examples/usecases/aci_mcp/aci_toolkit_camel.py b/examples/usecases/aci_mcp/aci_toolkit_camel.pyindex 26e8187d0..c28e0b642 100644--- a/examples/usecases/aci_mcp/aci_toolkit_camel.py+++ b/examples/usecases/aci_mcp/aci_toolkit_camel.py@@ -42,7 +42,7 @@ def main():# setup gemini modelmodel = ModelFactory.create(model_platform=ModelPlatformType.GEMINI,- model_type=ModelType.GEMINI_2_5_PRO_PREVIEW,+ model_type=ModelType.GEMINI_2_5_PRO,api_key=os.getenv("GEMINI_API_KEY"),model_config_dict={"temperature": 0.5, "max_tokens": 40000},)diff --git a/examples/usecases/aci_mcp/camel_mcp_aci.py b/examples/usecases/aci_mcp/camel_mcp_aci.pyindex 40ca25761..43972e2db 100644--- a/examples/usecases/aci_mcp/camel_mcp_aci.py+++ b/examples/usecases/aci_mcp/camel_mcp_aci.py@@ -50,7 +50,7 @@ async def main():# setup gemini modelmodel = ModelFactory.create(model_platform=ModelPlatformType.GEMINI,- model_type=ModelType.GEMINI_2_5_PRO_PREVIEW,+ model_type=ModelType.GEMINI_2_5_PRO,api_key=os.getenv("GEMINI_API_KEY"),model_config_dict={"temperature": 0.7, "max_tokens": 40000},)diff --git a/examples/usecases/cloudfare_mcp_camel/app.py b/examples/usecases/cloudfare_mcp_camel/app.pyindex e5a5284f6..d9f57ed36 100644--- a/examples/usecases/cloudfare_mcp_camel/app.py+++ b/examples/usecases/cloudfare_mcp_camel/app.py@@ -28,7 +28,7 @@ dotenv.load_dotenv()# Initialize the modelmodel = ModelFactory.create(model_platform=ModelPlatformType.GEMINI,- model_type=ModelType.GEMINI_2_5_PRO_PREVIEW,+ model_type=ModelType.GEMINI_2_5_PRO,api_key=os.getenv("GEMINI_API_KEY"),model_config_dict={"temperature": 0.5, "max_tokens": 4096},)diff --git a/test/models/test_gemini_model.py b/test/models/test_gemini_model.pyindex 80259d89c..1aef9d4d2 100644--- a/test/models/test_gemini_model.py+++ b/test/models/test_gemini_model.py@@ -25,7 +25,7 @@ from camel.utils import OpenAITokenCounter@pytest.mark.parametrize("model_type",[- ModelType.GEMINI_2_5_PRO_PREVIEW,+ ModelType.GEMINI_2_5_PRO,ModelType.GEMINI_2_0_FLASH,ModelType.GEMINI_1_5_FLASH,ModelType.GEMINI_1_5_PRO,