Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

chore: Update model doc and zhipu model (#3722)

Tao Sunceb2afbd0cd7
diff --git a/camel/types/enums.py b/camel/types/enums.py
index 01d23edf6..986cf578e 100644
--- a/camel/types/enums.py
+++ b/camel/types/enums.py
@@ -69,6 +69,11 @@ class ModelType(UnifiedModelType, Enum):
AMD_GPT4 = "dvue-aoai-001-gpt-4.1"
+ GLM_4_7 = "glm-4.7"
+ GLM_4_7_FLASH = "glm-4.7-flash"
+ GLM_4_6 = "glm-4.6"
+ GLM_4_6V = "glm-4.6v"
+ GLM_4_6V_FLASH = "glm-4.6v-flash"
GLM_4 = "glm-4"
GLM_4V = "glm-4v"
GLM_4V_FLASH = "glm-4v-flash"
@@ -672,6 +677,11 @@ class ModelType(UnifiedModelType, Enum):
ModelType.GLM_4_FLASHX,
ModelType.GLM_4_FLASH,
ModelType.GLM_ZERO_PREVIEW,
+ ModelType.GLM_4_7,
+ ModelType.GLM_4_7_FLASH,
+ ModelType.GLM_4_6,
+ ModelType.GLM_4_6V,
+ ModelType.GLM_4_6V_FLASH,
}
@property
@@ -1481,6 +1491,8 @@ class ModelType(UnifiedModelType, Enum):
ModelType.MODELSCOPE_ERNIE_4_5_VL_28B_A3B_THINKING,
ModelType.ERNIE_5_0_THINKING,
ModelType.ERNIE_4_5_TURBO_VL,
+ ModelType.GLM_4_6V,
+ ModelType.GLM_4_6V_FLASH,
}:
return 128_000
elif self in {
@@ -1545,6 +1557,9 @@ class ModelType(UnifiedModelType, Enum):
ModelType.AWS_CLAUDE_OPUS_4_1,
ModelType.O4_MINI,
ModelType.O3,
+ ModelType.GLM_4_7,
+ ModelType.GLM_4_7_FLASH,
+ ModelType.GLM_4_6,
}:
return 200_000
elif self in {
diff --git a/docs/mintlify/key_modules/models.mdx b/docs/mintlify/key_modules/models.mdx
index 65348e239..b9b5ce2d2 100644
--- a/docs/mintlify/key_modules/models.mdx
+++ b/docs/mintlify/key_modules/models.mdx
@@ -47,7 +47,7 @@ CAMEL supports a wide range of models, including [OpenAI’s GPT series](https:/
| **DeepSeek** | deepseek-chat<br/>deepseek-reasoner |
| **CometAPI** | **All models available on [CometAPI](https://api.cometapi.com/pricing)**<br/>Including: gpt-5-chat-latest, gpt-5, gpt-5-mini, gpt-5-nano<br/>claude-opus-4-1-20250805, claude-sonnet-4-20250514, claude-3-7-sonnet-latest<br/>gemini-2.5-pro, gemini-2.5-flash, grok-4-0709, grok-3<br/>deepseek-v3.1, deepseek-v3, deepseek-r1-0528, qwen3-30b-a3b |
| **Nebius** | **All models available on [Nebius AI Studio](https://studio.nebius.com/)**<br/>Including: gpt-oss-120b, gpt-oss-20b, GLM-4.5<br/>DeepSeek V3 & R1, LLaMA, Mistral, and more |
-| **ZhipuAI** | glm-4, glm-4v, glm-4v-flash<br/>glm-4v-plus-0111, glm-4-plus, glm-4-air<br/>glm-4-air-0111, glm-4-airx, glm-4-long<br/>glm-4-flashx, glm-zero-preview, glm-4-flash, glm-3-turbo |
+| **ZhipuAI** | glm-4.7, glm-4.7-flash<br/>glm-4.6, glm-4.6v, glm-4.6v-flash<br/>glm-4, glm-4v, glm-4v-flash<br/>glm-4v-plus-0111, glm-4-plus, glm-4-air<br/>glm-4-air-0111, glm-4-airx, glm-4-long<br/>glm-4-flashx, glm-zero-preview, glm-4-flash, glm-3-turbo |
| **InternLM** | internlm3-latest, internlm3-8b-instruct<br/>internlm2.5-latest, internlm2-pro-chat |
| **Reka** | reka-core, reka-flash, reka-edge |
| **COHERE** | command-r-plus, command-r, command-light, command, command-nightly |
@@ -456,6 +456,41 @@ Integrate your favorite models into CAMEL-AI with straightforward Python calls.
</Tabs>
+## Using OpenAI-Compatible Models
+
+If your provider exposes an OpenAI-compatible API, you can connect it by
+using `OPENAI_COMPATIBLE_MODEL` and passing the model name as a string. This
+lets you reuse the same request patterns while pointing to a different
+endpoint.
+
+```python
+import os
+from camel.agents import ChatAgent
+from camel.models import ModelFactory
+from camel.types import ModelPlatformType
+
+model = ModelFactory.create(
+ model_platform=ModelPlatformType.OPENAI_COMPATIBLE_MODEL,
+ model_type="your-model-name", #e.g. "gpt-4o"
+ url="https://your-openai-compatible-endpoint/v1",
+ api_key=os.getenv("OPENAI_COMPATIBLE_API_KEY"),
+ model_config_dict={"temperature": 0.2},
+)
+
+agent = ChatAgent(
+ system_message="You are a helpful assistant.",
+ model=model
+)
+
+response = agent.step("Explain quantum computing in simple terms.")
+print(response.msg.content)
+```
+
+<Note type="info">
+ Replace the model name, base URL, and API key with values provided by your
+ OpenAI-compatible service.
+</Note>
+
## Using On-Device Open Source Models