fix(client): correct GetChunkByIDOnly endpoint

Use /api/v1/chunks/by-id/{id} to match backend route.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
qingfhuang
2026-05-11 15:17:05 +08:00
committed by lyingbug
parent 1e3aa337db
commit 0eb95ccbd8
+1 -1
View File
@@ -156,7 +156,7 @@ func (c *Client) DeleteChunk(ctx context.Context, knowledgeID string, chunkID st
// GetChunkByIDOnly retrieves a chunk by its ID without requiring knowledge ID
func (c *Client) GetChunkByIDOnly(ctx context.Context, chunkID string) (*Chunk, error) {
path := fmt.Sprintf("/api/v1/chunks/get-by-id/%s", chunkID)
path := fmt.Sprintf("/api/v1/chunks/by-id/%s", chunkID)
resp, err := c.doRequest(ctx, http.MethodGet, path, nil, nil)
if err != nil {
return nil, err