Skip to content

This project is designed to revolutionize how we interact and utilize our codebase. It leverages the PolyFact SDK to embed the entire code project into a vector store. The stored code vectors represent the entire context of the codebase, enabling an efficient and sophisticated way to manage and use our project's code.

kevin-btc/vectorizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Here is a README generated from the code snippet:

@polyfact/vectorizer

Vectorize code repositories and PDFs into vector representations using Polyfact AI.

Installation

npm install @polyfact/vectorizer

Or install globally to use the CLI:

npm install -g @polyfact/vectorizer

Usage

As a library

import Vectorizer, { SourceType } from "@polyfact/vectorizer";

const vectorizer = new Vectorizer(token, maxTokens, SourceType.DIRECTORY);

const files = await vectorizer.readFiles(filePaths);
await vectorizer.vectorize(files, progressCallback);

const memoryId = vectorizer.getMemoryId();

CLI

$ @polyfact/vectorizer --help

Usage: @polyfact/vectorizer [options] [command]

Options:
  -V, --version   output the version number
  -h, --help      display help for command

Commands:
  repo [files...]  Transform your entire repository into a vector representation
  pdf [files...]   Transform your entire PDFs into a vector representation
  help [command]   display help for command

Vectorize a code repository:

$ @polyfact/vectorizer repo src/ --token abc123 --max-token 1000

Vectorize PDF files:

$ @polyfact/vectorizer pdf file1.pdf file2.pdf --token abc123

The memory ID will be output after vectorization to use in your project with the Polyfact SDK.

License

MIT

About

This project is designed to revolutionize how we interact and utilize our codebase. It leverages the PolyFact SDK to embed the entire code project into a vector store. The stored code vectors represent the entire context of the codebase, enabling an efficient and sophisticated way to manage and use our project's code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published