Skip to content

Conversation

@mcsaur
Copy link

@mcsaur mcsaur commented May 7, 2025

This pull request introduces significant updates to the codebase, including configuration enhancements, new documentation, and the addition of several utility classes. The changes aim to improve configuration flexibility, enhance documentation for the Vectra library, and provide new functionalities for vector database operations.

Configuration Updates:

  • .eslintrc.json: Replaced the base configuration with a detailed ESLint setup, including environment settings (node, es2021, mocha), TypeScript-specific rules, and custom linting rules for code style.
  • api-extractor.json: Replaced the inherited configuration with a comprehensive setup for API Extractor, enabling features like DTS rollup, TSDoc metadata generation, and API report generation.

Documentation Enhancements:

  • docs/.nojekyll: Added to prevent GitHub Pages from using Jekyll, ensuring compatibility with TypeDoc-generated documentation.
  • docs/README.md: Introduced a detailed README for the Vectra library, explaining its purpose, installation, usage, and limitations as a local vector database.

New Utility Classes:

  • FileFetcher: Added a class for fetching text content from local files, implementing the TextFetcher interface.
  • GPT3Tokenizer: Added a tokenizer class for encoding and decoding text using the GPT-3 tokenizer, implementing the Tokenizer interface.
  • ItemSelector: Added a utility class for vector operations, including cosine similarity, normalization, and metadata filtering.
  • LocalDocument: Added a class representing a document stored in a local index, with methods for metadata and text retrieval.
  • LocalDocumentResult: Added a class extending LocalDocument to represent query results, including methods for rendering text sections and retrieving matched chunks.

mcsaur added 2 commits May 6, 2025 19:45
…ce documentation

- Updated .eslintrc.json to include TypeScript support and custom rules.
- Modified package.json and package-lock.json to upgrade dependencies, including axios and openai.
- Added tsconfig.test.json for test configurations.
- Removed yarn.lock and updated .gitignore to include temp files.
- Enhanced documentation with TypeDoc, including new modules and classes.
- Refactored code for consistency and improved error handling in various files.
…ency

- Removed unnecessary type assertions when reading file paths and URIs.
- Streamlined the code for better readability and maintainability.
@Stevenic
Copy link
Owner

Stevenic commented May 7, 2025

Thanks for the PR @mcsaur ... It's really big so I want to merge it into a 0.11.0-preview release so that I have some time to test it...

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.

2 participants