Skip to content

Commit

Permalink
update tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed Oct 11, 2024
1 parent dc93bfc commit d86d67c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/sphinx_doc/en/source/tutorial/208-distribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ The implementation of `AgentServerLauncher` is located at `src/agentscope/server
- The method to launch through command line is as follows. In addition to specifying `host` and `port`, you also need to specify `model_config_path` and `agent_dir`, which correspond to the model configuration file path and the directory where custom agent classes are located, respectively. When installing `agentscope`, the `as_server` command will be installed by default, so you can directly use this command in the command line.

```shell
as_server --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents.py
as_server start --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents.py
```

```{warning}
Expand Down Expand Up @@ -440,7 +440,7 @@ launcher = RpcAgentServerLauncher(
```

```shell
as_server --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --capacity 10
as_server start --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --capacity 10
```

##### `result_pool`
Expand All @@ -462,7 +462,7 @@ launcher = RpcAgentServerLauncher(
```

```shell
as_server --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --pool-type redis --redis-url redis://localhost:6379 --max-expire-time 7200
as_server start --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --pool-type redis --redis-url redis://localhost:6379 --max-expire-time 7200
```

[[Back to the top]](#208-distribute-en)
6 changes: 3 additions & 3 deletions docs/sphinx_doc/zh_CN/source/tutorial/208-distribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ Server 端主要基于 gRPC 实现,主要包含 `AgentServerServicer` 和 `Rpc
- 通过命令行启动的具体方法如下,除了需要指定 `host``port` 外,还需要指定 `model_config_path``agent_dir`,分别对应模型配置文件路径和自定义 Agent 类所在的目录。在安装 `agentscope` 时默认会安装 `as_server` 指令,所以可以直接在命令行中使用该指令。

```shell
as_server --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents.py
as_server start --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents.py
```

```{warning}
Expand Down Expand Up @@ -447,7 +447,7 @@ launcher = RpcAgentServerLauncher(
```

```shell
as_server --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --capacity 10
as_server start --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --capacity 10
```

##### `result_pool`
Expand All @@ -469,7 +469,7 @@ launcher = RpcAgentServerLauncher(
```

```shell
as_server --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --pool-type redis --redis-url redis://localhost:6379 --max-expire-time 7200
as_server start --host localhost --port 12345 --model-config-path model_config_path --agent-dir parent_dir_of_myagents --pool-type redis --redis-url redis://localhost:6379 --max-expire-time 7200
```

[[回到顶部]](#208-distribute-zh)
2 changes: 1 addition & 1 deletion src/agentscope/server/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def as_server() -> None:
.. code-block:: shell
as_server --host localhost \
as_server start --host localhost \
--port 12345 \
--model-config-path config.json \
--agent-dir ./my_agents
Expand Down

0 comments on commit d86d67c

Please sign in to comment.