Coder Social home page Coder Social logo

aifs's Introduction

AI Filesystem

Local semantic search over folders. Why didn't this exist?

pip install aifs
from aifs import search

search("How does AI Filesystem work?", path="/path/to/folder")
search("It's not unlike how Spotlight works.") # Path defaults to CWD

How it works


aifs

Running aifs.search will chunk and embed all nested supported files (.txt, .docx, .pptx, .jpg, .png, .eml, .html, and .pdf) in path. It will then store these embeddings into an _.aifs file in path.

By storing the index, you only have to chunk/embed once. This makes semantic search very fast after the first time you search a path.

If a file has changed or been added, aifs.search will update or add those chunks. We still need to handle file deletions (we welcome PRs).

In detail:

  1. If a folder hasn't been indexed, we first use unstructured to parse and chunk every file in the path.
  2. Then we use chroma to embed the chunks locally and save them to a _.aifs file in path.
  3. Finally, chroma is used again to semantically search the embeddings.

If an _.aifs file is found in a directory, it uses that instead of indexing it again. If some files have been updated, it will re-index those.

Why?

We built this to let open-interpreter quickly semantically search files/folders.

aifs's People

Contributors

killianlucas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.