You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/commands/src/commands/knowledge/chunk-add.ts
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ const CHUNK_ADD_FLAGS = {
23
23
type: "string",
24
24
valueHint: "<id>",
25
25
description:
26
-
"Owning document ID; required for table/image knowledge bases (the server rejects field-channel chunks without it), optional for document-type",
26
+
"Owning document ID from the doc list command; required in practice — the server returns HTTP 500 (dataId不能为空) without it even for unstructured KBs",
27
27
},
28
28
content: {
29
29
type: "string",
@@ -74,7 +74,8 @@ export default defineCommand({
74
74
flags: CHUNK_ADD_FLAGS,
75
75
notes: [
76
76
"Document / table / image knowledge bases are supported; audio-video ones are not.",
77
-
"Table/image knowledge bases require --doc-id — verified live: the server returns HTTP 500 (dataId不能为空) without it. Use the document-level id from the doc list command; the per-row doc_id in chunk list metadata is rejected (Index.InvalidParameter).",
77
+
"--doc-id is required in practice — verified live: even unstructured (document-type) KBs return HTTP 500 (dataId不能为空) without it. Use the document-level id from the doc list command; the per-row doc_id in chunk list metadata is rejected (Index.InvalidParameter).",
78
+
"Adding a text content chunk to an image-type document (jpg) triggers HTTP 500 (Index.SystemError) — the server does not support text chunks on image documents. Target a text-type document (docx/pdf/txt) instead.",
78
79
"The API is idempotent but rate-limited to 10 calls per second — throttle batch scripts.",
79
80
"The response carries no chunk id; list chunks afterwards to find the new one.",
80
81
"For table/image knowledge bases use --field with Excel column headers as keys; values are passed through as strings.",
|`--index-id <id>`| string | yes | Knowledge base ID |
209
-
|`--doc-id <id>`| string | no | Owning document ID; required for table/image knowledge bases (the server rejects field-channel chunks without it), optional for document-type |
209
+
|`--doc-id <id>`| string | no | Owning document ID from the doc list command; required in practice — the server returns HTTP 500 (dataId不能为空) without it even for unstructured KBs|
210
210
|`--content <text>`| string | no | Chunk body text, up to 6000 chars (document-type); alternative to --content-file |
211
211
|`--content-file <path>`| string | no | Read chunk body from a UTF-8 plain text file (.md/.txt etc.) |
212
212
|`--title <text>`| string | no | Chunk title, up to 50 chars (document-type) |
- Document / table / image knowledge bases are supported; audio-video ones are not.
222
-
- Table/image knowledge bases require --doc-id — verified live: the server returns HTTP 500 (dataId不能为空) without it. Use the document-level id from the doc list command; the per-row doc_id in chunk list metadata is rejected (Index.InvalidParameter).
222
+
- --doc-id is required in practice — verified live: even unstructured (document-type) KBs return HTTP 500 (dataId不能为空) without it. Use the document-level id from the doc list command; the per-row doc_id in chunk list metadata is rejected (Index.InvalidParameter).
223
+
- Adding a text content chunk to an image-type document (jpg) triggers HTTP 500 (Index.SystemError) — the server does not support text chunks on image documents. Target a text-type document (docx/pdf/txt) instead.
223
224
- The API is idempotent but rate-limited to 10 calls per second — throttle batch scripts.
224
225
- The response carries no chunk id; list chunks afterwards to find the new one.
225
226
- For table/image knowledge bases use --field with Excel column headers as keys; values are passed through as strings.
0 commit comments