LearnNewsExamplesServices
Frontmatter
id7511
titleSeparate Create and Embed Services
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 16, 2025, 1:32 PM
updatedAtOct 16, 2025, 1:36 PM
githubUrlhttps://github.com/neomjs/neo/issues/7511
authortobiu
commentsCount0
parentIssue7501
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 16, 2025, 1:36 PM

Separate Create and Embed Services

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 16, 2025, 1:32 PM

Currently, the sync_database tool is a single, monolithic operation that combines both the creation of the knowledge base JSONL file and the embedding of its content into ChromaDB. This lacks the granular control provided by the original createKnowledgeBase.mjs and embedKnowledgeBase.mjs scripts.

This ticket covers the work to separate this functionality into distinct tools to improve modularity, debuggability, and feature parity.

Acceptance Criteria

  1. The openapi.yaml is updated to include two new endpoints under the Database tag:
    • POST /db/create: With operationId: create_knowledge_base.
    • POST /db/embed: With operationId: embed_knowledge_base.
  2. The databaseService.mjs is refactored:
    • The logic from the existing syncDatabase function is split into two new functions: createKnowledgeBase and embedKnowledgeBase.
    • The createKnowledgeBase function will only generate the dist/ai-knowledge-base.jsonl file.
    • The embedKnowledgeBase function will read the .jsonl file and perform the diff, embedding, and upserting into ChromaDB.
  3. The existing syncDatabase function is refactored to be a simple orchestrator that calls createKnowledgeBase() and then embedKnowledgeBase() in sequence.
  4. The toolService.mjs serviceMapping is updated to map the new operationIds to their respective service functions.
tobiu assigned to @tobiu on Oct 16, 2025, 1:32 PM
tobiu added the enhancement label on Oct 16, 2025, 1:32 PM
tobiu added the ai label on Oct 16, 2025, 1:32 PM
tobiu added parent issue #7501 on Oct 16, 2025, 1:32 PM
tobiu referenced in commit 82ce4fd - "Separate Create and Embed Services #7511" on Oct 16, 2025, 1:36 PM
tobiu closed this issue on Oct 16, 2025, 1:36 PM