Skip to content

fix: adapt Notebook to shared Knowhere demo corpus - #185

Merged
suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/shared-demo-corpus-adapter
Oct 10, 2026
Merged

suguanYang merged 1 commit into
mainfrom
fix/wangbinqi/shared-demo-corpus-adapter

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Problem

The Knowhere shared demo catalog changed its example citation payload. Notebook still required the legacy nested source object, canonical_chunk_id, and chunk_type fields, so the guest homepage failed during server rendering with Expected non-empty string from Knowhere demo API.

Changes

  • Normalize both legacy and shared-corpus citation shapes at the Knowhere boundary.
  • Preserve shared-corpus row IDs and parser chunk IDs separately.
  • Derive source metadata from top-level shared-corpus fields and the enclosing demo source.
  • Normalize scalar page_number values and default missing chunk types to text.
  • Accept chunk-page envelopes that omit source metadata, using the catalog as a fallback.
  • Add regression coverage for the live shared-corpus citation and chunk-page shapes.

Verification

  • pnpm vitest run src/integrations/knowhere-demo.test.ts
  • pnpm test — 836 passed, 14 skipped
  • pnpm lint
  • pnpm typecheck
  • pnpm build

@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
knowhere-notebook-staging Ready Ready Preview Oct 10, 2026 9:53am UTC
1 Skipped Deployment
Project Deployment Actions Updated
knowhere-notebook Ignored Ignored Preview Oct 10, 2026 9:53am UTC

Request Review

@suguanYang
suguanYang merged commit 036cf74 into main Oct 10, 2026
7 checks passed

This branch was successfully deployed

1 active deployment
Preview – knowhere-notebook-staging — 65f3a51d Deployed Oct 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant