Skip to content

Commit

Permalink
fix typos in tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
DavdGao committed May 13, 2024
1 parent f99c96b commit 765d1e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
17 changes: 8 additions & 9 deletions docs/sphinx_doc/en/source/tutorial/203-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
- [Parser Module](#parser-module)
- [Overview](#overview)
- [String Type](#string-type)
- [MarkdownCodeBlockParser](#summary-markdowncodeblockparser-summary)
- [MarkdownCodeBlockParser](#markdowncodeblockparser)
- [Initialization](#initialization)
- [Format Instruction Template](#format-instruction-template)
- [Parse Function](#parse-function)
- [Dictionary Type](#dictionary-type)
- [MarkdownJsonDictParser](#summary-markdownjsondictparser-summary)
- [MarkdownJsonDictParser](#markdownjsondictparser)
- [Initialization & Format Instruction Template](#initialization--format-instruction-template)
- [MultiTaggedContentParser](#summary-multitaggedcontentparser-summary)
- [MultiTaggedContentParser](#multitaggedcontentparser)
- [Initialization & Format Instruction Template](#initialization--format-instruction-template-1)
- [Parse Function](#parse-function-1)
- [JSON / Python Object Type](#json--python-object-type)
- [MarkdownJsonObjectParser](#summary-markdownjsonobjectparser-summary)
- [MarkdownJsonObjectParser](#markdownjsonobjectparser)
- [Initialization & Format Instruction Template](#initialization--format-instruction-template-2)
- [Parse Function](#parse-function-2)
- [Typical Use Cases](#typical-use-cases)
Expand Down Expand Up @@ -84,7 +84,7 @@ In the following sections, we will introduce the usage of these parsers based on

<details>

#### <summary> MarkdownCodeBlockParser </summary>
<summary id="markdowncodeblockparser"> MarkdownCodeBlockParser </summary>

##### Initialization

Expand Down Expand Up @@ -261,8 +261,7 @@ Next we will introduce two parsers for dictionary type.
<details>
#### <summary> MarkdownJsonDictParser </summary>
<summary id="markdownjsondictparser"> MarkdownJsonDictParser </summary>
##### Initialization & Format Instruction Template
Expand Down Expand Up @@ -304,7 +303,7 @@ This parameter can be a string or a dictionary. For dictionary, it will be autom
<details>
#### <summary> MultiTaggedContentParser </summary>
<summary id="multitaggedcontentparser"> MultiTaggedContentParser </summary>
`MultiTaggedContentParser` asks LLM to generate specific content within multiple tag pairs. The content from different tag pairs will be parsed into a single Python dictionary. Its usage is similar to `MarkdownJsonDictParser`, but the initialization method is different, and it is more suitable for weak LLMs or complex return content.
Expand Down Expand Up @@ -386,7 +385,7 @@ print(res_dict)

<details>

#### <summary> MarkdownJsonObjectParser </summary>
<summary id="markdownjsonobjectparser"> MarkdownJsonObjectParser </summary>

`MarkdownJsonObjectParser` also uses the ```json and ``` tags in Markdown, but does not limit the content type. It can be a list, dictionary, number, string, etc., which can be parsed into a Python object via `json.loads`.

Expand Down
16 changes: 8 additions & 8 deletions docs/sphinx_doc/zh_CN/source/tutorial/203-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
- [解析器模块](#解析器模块)
- [功能说明](#功能说明)
- [字符串类型](#字符串str类型)
- [MarkdownCodeBlockParser](#summary-markdowncodeblockparser-summary)
- [MarkdownCodeBlockParser](#markdowncodeblockparser)
- [初始化](#初始化)
- [响应格式模版](#响应格式模版)
- [解析函数](#解析函数)
- [字典类型](#字典dict类型)
- [MarkdownJsonDictParser](#summary-markdownjsondictparser-summary)
- [MarkdownJsonDictParser](#markdownjsondictparser)
- [初始化 & 响应格式模版](#初始化--响应格式模版)
- [MultiTaggedContentParser](#summary-multitaggedcontentparser-summary)
- [MultiTaggedContentParser](#multitaggedcontentparser)
- [初始化 & 响应格式模版](#初始化--响应格式模版-1)
- [解析函数](#解析函数-1)
- [JSON / Python 对象类型](#json--python-对象类型)
- [MarkdownJsonObjectParser](#summary-markdownjsonobjectparser-summary)
- [MarkdownJsonObjectParser](#markdownjsonobjectparser)
- [初始化 & 响应格式模版](#初始化--响应格式模版-2)
- [解析函数](#解析函数-2)
- [典型使用样例](#典型使用样例)
Expand Down Expand Up @@ -82,7 +82,7 @@ AgentScope提供了多种不同解析器,开发者可以根据自己的需求

<details>

#### <summary> MarkdownCodeBlockParser </summary>
<summary id="markdowncodeblockparser"> MarkdownCodeBlockParser </summary>

##### 初始化

Expand Down Expand Up @@ -261,7 +261,7 @@ AgentScope中,我们通过调用`to_content`,`to_memory`和`to_metadata`方
<details>
#### <summary> MarkdownJsonDictParser </summary>
<summary id="markdownjsondictparser"> MarkdownJsonDictParser </summary>
##### 初始化 & 响应格式模版
Expand Down Expand Up @@ -300,7 +300,7 @@ AgentScope中,我们通过调用`to_content`,`to_memory`和`to_metadata`方

<details>

#### <summary> MultiTaggedContentParser </summary>
<summary id="multitaggedcontentparser"> MultiTaggedContentParser </summary>

`MultiTaggedContentParser`要求 LLM 在多个指定的标签对中产生指定的内容,这些不同标签的内容将一同被解析为一个 Python 字典。使用方法与`MarkdownJsonDictParser`类似,只是初始化方法不同,更适合能力较弱的LLM,或是比较复杂的返回内容。

Expand Down Expand Up @@ -381,7 +381,7 @@ print(res_dict)

<details>

#### <summary> MarkdownJsonObjectParser </summary>
<summary id="markdownjsonobjectparser"> MarkdownJsonObjectParser </summary>

`MarkdownJsonObjectParser`同样采用 Markdown 的```json和```标识,但是不限制解析的内容的类型,可以是列表,字典,数值,字符串等可以通过`json.loads`进行解析字符串。

Expand Down

0 comments on commit 765d1e5

Please sign in to comment.