.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "build_tutorial/quickstart.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_build_tutorial_quickstart.py: .. _quickstart: 快速入门 ============================ AgentScope 需要 Python 3.9 或更高版本。你可以从源码或 pypi 安装。 从 PyPI 安装 ---------------- .. code-block:: bash pip install agentscope 从源码安装 ---------------- 要从源码安装 AgentScope,你需要从 GitHub 克隆仓库,然后通过以下命令安装 .. code-block:: bash git clone https://github.com/modelscope/agentscope cd agentscope pip install -e . 要确保 AgentScope 安装正常。可以执行以下代码: .. GENERATED FROM PYTHON SOURCE LINES 28-33 .. code-block:: Python import agentscope print(agentscope.__version__) .. rst-class:: sphx-glr-script-out .. code-block:: none 0.1.2 .. GENERATED FROM PYTHON SOURCE LINES 34-66 额外依赖 ---------------------------- AgentScope 提供了针对不同需求的额外依赖。你可以根据需求安装它们。 - ollama: Ollama API - litellm: Litellm API - zhipuai: Zhipuai API - gemini: Gemini API - anthropic: Anthropic API - service: 用于不同工具函数的依赖 - distribute: 用于分布式模式的依赖 - full: 一次性安装所有依赖 以分布式模式为例,安装命令因操作系统而异。 对于 Windows 用户: .. code-block:: bash pip install agentscope[gemini] # 或 pip install agentscope[ollama,distribute] 对于 Mac 和 Linux 用户: .. code-block:: bash pip install agentscope\[gemini\] # 或 pip install agentscope\[ollama,distribute\] .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.000 seconds) .. _sphx_glr_download_build_tutorial_quickstart.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: quickstart.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: quickstart.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: quickstart.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_