feat: support reading tags via API (#12891) (#13732)

### What problem does this PR solve?

Enable reading Tag Set tags via API (expose tag_kwd field). The result
of the queried list chunks is as shown below:

<img width="1422" height="818" alt="image"
src="https://github.com/user-attachments/assets/abd1960a-fe34-489e-9d72-525f8e574938"
/>


### Type of change

- [x] New Feature (non-breaking change which adds functionality)

Co-authored-by: heyang.why <heyang.why@alibaba-inc.com>
This commit is contained in:
Heyang Wang
2026-03-29 20:17:01 +08:00
committed by GitHub
parent cb78ce0a7b
commit 641b319647
13 changed files with 162 additions and 6 deletions

View File

@ -2005,6 +2005,7 @@ Adds a chunk to a specified document in a specified dataset.
- Body:
- `"content"`: `string`
- `"important_keywords"`: `list[string]`
- `"tag_kwd"`: `list[string]`
- `"image_base64"`: `string`
##### Request example
@ -2031,6 +2032,8 @@ curl --request POST \
The text content of the chunk.
- `"important_keywords`(*Body parameter*), `list[string]`
The key terms or phrases to tag with the chunk.
- `"tag_kwd"`: (*Body parameter*), `list[string]`
Tag keywords to associate with the chunk.
- `"questions"`(*Body parameter*), `list[string]`
If there is a given question, the embedded chunks will be based on them
- `"image_base64"`: (*Body parameter*), `string`
@ -2053,6 +2056,7 @@ Success:
"id": "12ccdc56e59837e5",
"image_id": "",
"important_keywords": [],
"tag_kwd": [],
"questions": []
}
}
@ -2123,6 +2127,7 @@ Success:
"id": "b48c170e90f70af998485c1065490726",
"image_id": "",
"important_keywords": "",
"tag_kwd": [],
"positions": [
""
]
@ -2267,6 +2272,7 @@ Updates content or configurations for a specified chunk.
- Body:
- `"content"`: `string`
- `"important_keywords"`: `list[string]`
- `"tag_kwd"`: `list[string]`
- `"available"`: `boolean`
##### Request example
@ -2295,6 +2301,8 @@ curl --request PUT \
The text content of the chunk.
- `"important_keywords"`: (*Body parameter*), `list[string]`
A list of key terms or phrases to tag with the chunk.
- `"tag_kwd"`: (*Body parameter*), `list[string]`
Updated tag keywords.
- `"available"`: (*Body parameter*) `boolean`
The chunk's availability status in the dataset. Value options:
- `true`: Available (default)
@ -2696,6 +2704,7 @@ Success:
"important_keywords": [
""
],
"tag_kwd": [],
"kb_id": "c7ee74067a2c11efb21c0242ac120006",
"positions": [
""