HELLO-AGENTS

task00

pip install "camel-ai[all]==0.2.38"

pip install "camel-ai[all]==0.2.38"
#%%
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="Qwen/Qwen2.5-72B-Instruct",
    url='https://api-inference.modelscope.cn/v1/',
    api_key='ms-xxxx你的魔搭API-KEY'
)

agent = ChatAgent(
    model=model,
    output_language='中文'
)

response = agent.step("你好,你是谁?")
print(response.msgs[0].content)

# >>>
# 你好,我是来自阿里云的大规模语言模型,我叫通义千问。

image

posted @ 2025-12-17 00:05  CharyGao  阅读(0)  评论(0)    收藏  举报