diff --git a/docs/sphinx_doc/en/source/tutorial/207-monitor.md b/docs/sphinx_doc/en/source/tutorial/207-monitor.md index e43f67b4f..76c4d08b1 100644 --- a/docs/sphinx_doc/en/source/tutorial/207-monitor.md +++ b/docs/sphinx_doc/en/source/tutorial/207-monitor.md @@ -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 diff --git a/docs/sphinx_doc/zh_CN/source/tutorial/207-monitor.md b/docs/sphinx_doc/zh_CN/source/tutorial/207-monitor.md index 73e0daf4c..dc863b834 100644 --- a/docs/sphinx_doc/zh_CN/source/tutorial/207-monitor.md +++ b/docs/sphinx_doc/zh_CN/source/tutorial/207-monitor.md @@ -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` 完全相同,但内部不会执行任何操作。 ### 基本使用