From 3e1ee851178eaaaf4691eac830ba66eafdf738b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=81=93=E8=BE=95?= Date: Fri, 19 Jan 2024 16:07:27 +0800 Subject: [PATCH] fix according to xuchen's comments [hyperlinks] --- docs/sphinx_doc/source/conf.py | 5 +++ docs/sphinx_doc/source/index.rst | 3 +- .../sphinx_doc/source/tutorial/103-example.md | 6 ++-- .../sphinx_doc/source/tutorial/104-usecase.md | 4 +-- docs/sphinx_doc/source/tutorial/201-agent.md | 6 ++-- .../source/tutorial/208-distribute.md | 4 +-- docs/sphinx_doc/source/tutorial/main.md | 34 ++++++++----------- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/docs/sphinx_doc/source/conf.py b/docs/sphinx_doc/source/conf.py index 221d8ff67..003a56492 100644 --- a/docs/sphinx_doc/source/conf.py +++ b/docs/sphinx_doc/source/conf.py @@ -35,8 +35,13 @@ "sphinx.ext.napoleon", "sphinxcontrib.mermaid", "myst_parser", + "sphinx.ext.autosectionlabel", ] +# Prefix document path to section labels, otherwise autogenerated labels would +# look like 'heading' rather than 'path/to/file:heading' +autosectionlabel_prefix_document = True + # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] diff --git a/docs/sphinx_doc/source/index.rst b/docs/sphinx_doc/source/index.rst index 6a98ce3a8..feb525bfd 100644 --- a/docs/sphinx_doc/source/index.rst +++ b/docs/sphinx_doc/source/index.rst @@ -24,9 +24,8 @@ AgentScope Documentation .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :glob: - :hidden: :caption: AgentScope API Reference agentscope.agents diff --git a/docs/sphinx_doc/source/tutorial/103-example.md b/docs/sphinx_doc/source/tutorial/103-example.md index 088f01989..a5f514f46 100644 --- a/docs/sphinx_doc/source/tutorial/103-example.md +++ b/docs/sphinx_doc/source/tutorial/103-example.md @@ -26,7 +26,7 @@ model_config = { } ``` -For open-source models, we support integration with various model interfaces such as HuggingFace, ModelScope, FastChat, and vllm. You can find scripts on deploying these services in the `scripts` directory, and we defer the detailed instructions to [[Using Different Model Sources with Model API]](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/203-model.md). +For open-source models, we support integration with various model interfaces such as HuggingFace, ModelScope, FastChat, and vllm. You can find scripts on deploying these services in the `scripts` directory, and we defer the detailed instructions to [[Using Different Model Sources with Model API]](https://alibaba.github.io/AgentScope/tutorial/203-model.md). You can register your configuration by calling AgentScope's initilization method as follow. Besides, you can also load more than one config by calling init mutliple times. ```python @@ -55,7 +55,7 @@ dialogAgent = DialogAgent(name="assistant", model="gpt-4") userAgent = UserAgent() ``` -**NOTE**: Please refer to [[Customizing Your Custom Agent with Agent Pool]](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/201-agent.md) for all available agents. +**NOTE**: Please refer to [[Customizing Your Custom Agent with Agent Pool]](https://alibaba.github.io/AgentScope/tutorial/201-agent.md) for all available agents. ## Step3: Agent Conversation @@ -96,7 +96,7 @@ while x is None or x.content != "exit": x = sequentialpipeline([dialog_agent, user_agent]) ``` -For more details about how to utilize pipelines for complex agent interactions, please refer to [[Agent Interactions: Dive deeper into Pipelines and Message Hub]](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/202-pipeline.md). +For more details about how to utilize pipelines for complex agent interactions, please refer to [[Agent Interactions: Dive deeper into Pipelines and Message Hub]](https://alibaba.github.io/AgentScope/tutorial/202-pipeline.md). diff --git a/docs/sphinx_doc/source/tutorial/104-usecase.md b/docs/sphinx_doc/source/tutorial/104-usecase.md index edcfa0c44..c1608df7b 100644 --- a/docs/sphinx_doc/source/tutorial/104-usecase.md +++ b/docs/sphinx_doc/source/tutorial/104-usecase.md @@ -10,7 +10,7 @@ Let the adventure begin to unlock the potential of multi-agent applications with ## Getting Started -Firstly, ensure that you have installed and configured AgentScope properly. Besides, we will involve the basic concepts of `Model API`, `Agent`, `Msg`, and `Pipeline,` as described in [Tutorial-Concept](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/102-concepts.md). The overview of this tutorial is shown below: +Firstly, ensure that you have installed and configured AgentScope properly. Besides, we will involve the basic concepts of `Model API`, `Agent`, `Msg`, and `Pipeline,` as described in [Tutorial-Concept](https://alibaba.github.io/AgentScope/tutorial/102-concepts.md). The overview of this tutorial is shown below: * [Step 1: Prepare **Model API** and Set Model Configs](#step-1-prepare-model-api-and-set-model-configs) * [Step 2: Define the Roles of Each **Agent**](#step-2-define-the-roles-of-each-agent) @@ -22,7 +22,7 @@ Firstly, ensure that you have installed and configured AgentScope properly. Besi ### Step 1: Prepare Model API and Set Model Configs -As we discussed in the last tutorial, you need to prepare your model configurations into a JSON file for standard OpenAI chat API, FastChat, and vllm. More details and advanced usages such as configuring local models with POST API are presented in [Tutorial-Model-API](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/203-model.md). +As we discussed in the last tutorial, you need to prepare your model configurations into a JSON file for standard OpenAI chat API, FastChat, and vllm. More details and advanced usages such as configuring local models with POST API are presented in [Tutorial-Model-API](https://alibaba.github.io/AgentScope/tutorial/203-model.md). ```json [ diff --git a/docs/sphinx_doc/source/tutorial/201-agent.md b/docs/sphinx_doc/source/tutorial/201-agent.md index 77d17bd1d..58c9b5658 100644 --- a/docs/sphinx_doc/source/tutorial/201-agent.md +++ b/docs/sphinx_doc/source/tutorial/201-agent.md @@ -8,11 +8,11 @@ The `AgentBase` class is the architectural cornerstone for all agent constructs Each AgentBase derivative is composed of several key characteristics: -* `memory`: This attribute enables agents to retain and recall past interactions, allowing them to maintain context in ongoing conversations. For more details about `memory`, we defer to [Memory and Message Management](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/205-memory.md). +* `memory`: This attribute enables agents to retain and recall past interactions, allowing them to maintain context in ongoing conversations. For more details about `memory`, we defer to [Memory and Message Management](https://alibaba.github.io/AgentScope/tutorial/205-memory.md). -* `model`: The model is the computational engine of the agent, responsible for making a response given existing memory and input. For more details about `model`, we defer to [Using Different Model Sources with Model API](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/203-model.md). +* `model`: The model is the computational engine of the agent, responsible for making a response given existing memory and input. For more details about `model`, we defer to [Using Different Model Sources with Model API]https://alibaba.github.io/AgentScope/tutorial/203-model.md). -* `sys_prompt` & `engine`: The system prompt acts as predefined instructions that guide the agent in its interactions; and the `engine` is used to dynamically generate a suitable prompt. For more details about them, we defer to [Prompt Engine](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/206-prompt.md). +* `sys_prompt` & `engine`: The system prompt acts as predefined instructions that guide the agent in its interactions; and the `engine` is used to dynamically generate a suitable prompt. For more details about them, we defer to [Prompt Engine](https://alibaba.github.io/AgentScope/tutorial/206-prompt.md). In addition to these attributes, `AgentBase` endows agents with pivotal methods such as `observe` and `reply`: diff --git a/docs/sphinx_doc/source/tutorial/208-distribute.md b/docs/sphinx_doc/source/tutorial/208-distribute.md index f494a1665..66ca7bcb5 100644 --- a/docs/sphinx_doc/source/tutorial/208-distribute.md +++ b/docs/sphinx_doc/source/tutorial/208-distribute.md @@ -8,7 +8,7 @@ AgentScope is designed to be fully distributed, agent instances in one applicati [The actor model](https://en.wikipedia.org/wiki/Actor_model) is a popular concept in concurrent programming and adopted by AgentScope. Every agent is an actor and interacts with other agents through messages. The flow of messages implies the execution order of the agent. Each agent has a `reply` method that consumes a message and generates another message, and the generated message can be sent to other agents. For example, the figure below shows the workflow of multiple agents. `A` to `F` are all agents, and the arrows represent messages. -```mermaid +```{mermaid} graph LR; A-->B A-->C @@ -33,7 +33,7 @@ z = C(x) Although this code appears to be executed completely sequentially, AgentScope will **automatically detect potential parallelism** in your code as shown in the flow graph below, which means `C` will not wait for `B` to complete before starting execution. -```mermaid +```{mermaid} graph LR; A-->B A-->C diff --git a/docs/sphinx_doc/source/tutorial/main.md b/docs/sphinx_doc/source/tutorial/main.md index af03c2130..bbb8fa546 100644 --- a/docs/sphinx_doc/source/tutorial/main.md +++ b/docs/sphinx_doc/source/tutorial/main.md @@ -12,28 +12,24 @@ AgentScope is an innovative multi-agent platform designed to empower developers ### Getting Started -- [Installation Guide](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/101-installation.md) -- [Fundamental Concepts](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/102-concepts.md) -- [Getting Started with a Simple Example](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/103-example.md) -- [Crafting Your First Application](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/104-usecase.md) -- [Logging and WebUI](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/105-logging.md) +- [Installation Guide](tutorial/101-installation.md) +- [Fundamental Concepts](tutorial/102-concepts.md) +- [Getting Started with a Simple Example](tutorial/103-example.md) +- [Crafting Your First Application](tutorial/104-usecase.md) +- [Logging and WebUI](tutorial/105-logging.md) ### Advanced Exploration -- [Customizing Your Own Agent](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/201-agent.md) -- [Agent Interactions: Dive deeper into Pipelines and Message Hub](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/202-pipeline.md) -- [Using Different Model Sources with Model API](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/203-model.md) -- [Enhancing Agent Capabilities with Service Functions](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/204-service.md) -- [Memory and Message Management](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/205-memory.md) -- [Prompt Engine](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/206-prompt.md) -- [Monitoring](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/207-monitor.md) -- [Distributed Deployment](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/208-distribute.md) +- [Customizing Your Own Agent](tutorial/201-agent.md) +- [Agent Interactions: Dive deeper into Pipelines and Message Hub](tutorial/202-pipeline.md) +- [Using Different Model Sources with Model API](tutorial/203-model.md) +- [Enhancing Agent Capabilities with Service Functions](tutorial/204-service.md) +- [Memory and Message Management](tutorial/205-memory.md) +- [Prompt Engine](tutorial/206-prompt.md) +- [Monitoring](tutorial/207-monitor.md) +- [Distributed Deployment](tutorial/208-distribute.md) ### Getting Involved -* [Joining The AgentScope Community](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/301-community.md) -* [Contributing to AgentScope](https://github.com/alibaba/AgentScope/tree/main/docs/tutorial/302-contribute.md) - -### API References - -Please refer to [[API References]](https://alibaba.github.io/agentscope/) for details. \ No newline at end of file +* [Joining The AgentScope Community](tutorial/301-community.md) +* [Contributing to AgentScope](tutorial/302-contribute.md) \ No newline at end of file