chunking
Package github.com/emergent-company/emergent.memory/apps/server/pkg/sdk/chunking
The chunking client re-runs the chunking pipeline on an already-ingested document, using the project’s current chunking strategy.
Methods
Section titled “Methods”func (c *Client) RecreateChunks(ctx context.Context, documentID string) (*RecreateChunksResponse, error)Key Types
Section titled “Key Types”RecreateChunksResponse
Section titled “RecreateChunksResponse”type RecreateChunksResponse struct { Status string Summary RecreateChunksSummary}
type RecreateChunksSummary struct { OldChunks int NewChunks int Strategy string ParentChild bool AutoProfile bool Shape string Config map[string]any}Example
Section titled “Example”resp, err := client.Chunking.RecreateChunks(ctx, "doc_abc123")if err != nil { return err}fmt.Printf("re-chunked with %s: %d → %d chunks\n", resp.Summary.Strategy, resp.Summary.OldChunks, resp.Summary.NewChunks,)if resp.Summary.AutoProfile { fmt.Printf("shape detected: %s\n", resp.Summary.Shape)}