jacky-xbb / supabase-vector-py

how to use LangChain and Supabase to create a vector store for Documents using OpenAI embeddings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supabase Vector Store

flowchart

This project demonstrates how to use LangChain and Supabase to create a vector store for Documents using OpenAI embeddings. The text data is split into manageable chunks and stored in Supabase for efficient retrieval.

Prerequisites

  • Python 3.12
  • Pipenv

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/supabase-vector-store.git
    cd supabase-vector-store
  2. Install dependencies using Pipenv:

    pipenv install
  3. Create a .env file in the root directory and add your Supabase and OpenAI credentials:

    SUPABASE_API_URL=your_supabase_api_url
    SUPABASE_API_KEY=your_supabase_api_key
    OPENAI_API_KEY=your_openai_api_key
    OPENAI_API_URL=your_openai_api_url
    

Usage

  1. Ensure you have a text file named personal-info.txt in the root directory with the content you want to process.

  2. Install the dependencies using Pipenv:

    pipenv install
  3. Run the script:

    pipenv run python vector.py
  4. If the script runs successfully, you should see the message:

    Documents stored successfully.
    

License

This project is licensed under the MIT License.

Contributing

Feel free to open issues or submit pull requests for improvements or bug fixes.

Acknowledgements

About

how to use LangChain and Supabase to create a vector store for Documents using OpenAI embeddings.

License:MIT License


Languages

Language:Python 100.0%