All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Initial project setup for a TypeScript Node.js RAG SDK.
package.json: Project metadata, scripts (build, start, dev), and initial dependencies (typescript,ts-node,@types/node).tsconfig.json: TypeScript compiler configuration for ES2020 target, CommonJS modules, and output todistdirectory.
- Core SDK component structure in
src/directory:index.ts: Main SDK entry point, exporting all core components.data-loader.ts: PlaceholderDataLoaderclass andDocument,DataSourceConfiginterfaces.vector-store.ts: PlaceholderVectorStoreclass andVectorStoreConfig,EmbeddingModelinterfaces.retriever.ts: PlaceholderRetrieverclass andRetrieverConfiginterface.llm.ts: PlaceholderLLMclass andLLMConfig,LLMResponseinterfaces.pipeline.ts: PlaceholderRAGPipelineclass andRAGPipelineConfiginterface for orchestrating the RAG flow.
ARCHITECTURE.MD: Document outlining the basic architecture and core components of the RAG SDK.INSTRUCTIONS.MD: Detailed instructions for project setup, building the SDK, and running example tests.examples/directory for usage examples.examples/basic-test.ts: A basic script demonstrating the initialization and usage of theRAGPipelinewith mock components.
.gitignorefile with common Node.js and OS-specific ignores.- This
CHANGELOG.mdfile. - Preference for
pnpmas the package manager recorded and used. - Next.js web example application (
examples/web) demonstrating a RAG chat interface:- Integrates Vercel AI SDK for chat streaming (
useChathook). - Features an API route (
/api/chat/route.ts) using OpenAI SDK for embeddings, Astra DB for vector search, and Vercel AI SDK (@ai-sdk/openai) for LLM streaming. - Includes frontend components (
prompt.tsx,page.tsx) and styling (globals.css) for the chat UI. package.jsoninexamples/webupdated withai,@ai-sdk/openai,@ai-sdk/react, andopenaidependencies.- Basic
.gitignoreand an emptytsconfig.jsonadded toexamples/web.
- Integrates Vercel AI SDK for chat streaming (
scripts/update.ts: A script to fetch content from specified URLs, generate embeddings, and store them in Astra DB, supplementingseed.ts.updatescript in the rootpackage.jsonfor runningscripts/update.ts.- Root project dependencies:
@langchain/community,langchain,puppeteerto support web scraping and text splitting in scripts.
- Updated
src/index.tsto export all core SDK components and interfaces. - Switched to using
pnpmfor package management (pnpm install,pnpm run build). ARCHITECTURE.md: Updated conceptual code examples to TypeScript and aligned content with the current technology stack (Vercel AI SDK, specific OpenAI models, Astra DB client).examples/web/app/api/chat/route.ts: Refactored significantly to use the official OpenAI Node.js SDK for embeddings and the Vercel AI SDK (streamText) for chat completions, including environment variable validation and detailed system prompt construction.examples/web/globals.css: Enhanced chat UI styling, implemented a scrollable message area with custom scrollbars.examples/web/components/prompt.tsx: Revised prompt suggestions for the chat interface.examples/web/app/page.tsx: Improved UI for handling empty message states and displaying loading indicators during message streaming.
- Resolved linting errors in
package.jsonrelated to JSON syntax. - Resolved TypeScript linting errors in
src/index.tsregarding ambiguous exports ofEmbeddingModelby adjustingsrc/pipeline.ts. - Corrected commenting style in
src/retriever.tsexample block to prevent linting issues. - Addressed file creation issues for
srcdirectory by usingmkdircommand explicitly. - Resolved TypeScript type errors related to streaming response handling in
examples/web/app/api/chat/route.tsby usingstream.toDataStreamResponse(). - Corrected syntax errors in
examples/web/app/api/chat/route.tscaused by duplicated lines. - Ensured correct import of
OpenAIclient from theopenaipackage (v5.x) inexamples/web/app/api/chat/route.ts.
- (No explicit removals of features in this initial setup)
- Placeholder for the first official release. To be updated when version 0.0.1 is tagged.