Skip to content

Commit

Permalink
update monitor tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed Apr 29, 2024
1 parent 3b89074 commit bdbbed1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/sphinx_doc/en/source/tutorial/207-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ Get a monitor instance from `MonitorFactory` to begin monitoring, and note that
monitor = MonitorFactory.get_monitor()
```

> Currently the above code returns a `SqliteMonitor` instance, which is initialized in `agentscope.init`.
> The `SqliteMonitor` class is the default implementation of `MonitorBase` class, which is based on Sqlite3.
Currently the above code returns a `SqliteMonitor` instance, which is initialized in `agentscope.init`.
The `SqliteMonitor` class is the default implementation of `MonitorBase` class, which is based on Sqlite3.

If you don't want to use monitor, you can set `use_monitor=False` in `agentscope.init` to disable the monitor. And in this case, the `MonitorFactory.get_monitor` method will return an instance of `DummyMonitor` which has the same interface as the `SqliteMonitor` class, but does nothing inside.

### Basic Usage

Expand Down
6 changes: 4 additions & 2 deletions docs/sphinx_doc/zh_CN/source/tutorial/207-monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
monitor = MonitorFactory.get_monitor()
```

> 目前上述代码返回的是 `SqliteMonitor` 实例,它在 `agentscope.init` 中初始化。
> `SqliteMonitor` 类是基于Sqlite3的 `MonitorBase` 类的默认实现。
目前上述代码将会返回一个 `SqliteMonitor` 实例,该实例在 `agentscope.init` 中初始化。
`SqliteMonitor` 是一个基于 Sqlite3 的 `MonitorBase` 实现,也是当前的默认 Monitor。

如果不需要使用 Monitor 的相关功能,可以通过向 `agentscope.init` 中传入 `use_monitor=False` 来关闭 monitor 组件。在这种情况下,`MonitorFactory.get_monitor` 将返回一个 `DummyMonitor` 实例,该实例对外接口与 `SqliteMonitor` 完全相同,但内部不会执行任何操作。

### 基本使用

Expand Down

0 comments on commit bdbbed1

Please sign in to comment.