Metadata-Version: 2.4
Name: labra-pgvectorstore
Version: 0.1.0
Summary: A Python library for managing vector stores.
Home-page: https://github.com/chronotron6/labra_pgvectorstore
Author: Labra 
Author-email: Labra  <chronotron6@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Labra 
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flask
Requires-Dist: flask-cors
Requires-Dist: python-dotenv
Requires-Dist: openai
Requires-Dist: tiktoken
Requires-Dist: sqlalchemy
Requires-Dist: psycopg2-binary
Requires-Dist: pgvector
Requires-Dist: numpy
Requires-Dist: sentence-transformers
Requires-Dist: Pillow
Requires-Dist: PyMuPDF
Requires-Dist: pypdf
Requires-Dist: PyPDF2
Requires-Dist: importlib-resources
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

*labra_pgvectorstore*

![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)

labra_pgvectorstore is a Python library and GUI application for managing vector stores in PostgreSQL databases, built with LangChain. It empowers users to upload, organize, search, and manage PDF or .txt documents as collections, query them with an integrated OpenAI chat completion bot, and manipulate documents or collections flexibly—all through a simple web application.

FEATURES
    Upload PDFs & Text Files:
    Easily add data from PDFs or .txt files into your vector store.

Collection Management:
    Group documents into custom-named collections (e.g., by topic).

OpenAI-Powered Search:
    Query your stored documents with natural language questions and filter search scope by selecting collections.

Flexible Deletion:
    Delete individual files or clear out entire collections (if empty), all from an intuitive interface.

Utility Functions:
    Use library functions directly in your Python code (see internal Labra Teams documentation for details).

PREREQUISITES
    Before installing labra_pgvectorstore, ensure you have:

    1. Python: Version 3.8 or higher.
    2. PostgreSQL: Installed on your local machine.
    3. pgvector Extension: Installed on your PostgreSQL database. (PGVector Installation Guide:     https://github.com/pgvector/pgvector)

INSTALLATION
Install the package and Initialize your environment variables:
    In the terminal type:
    1. pip install labra_pgvectorstore
    2. labrarag-env-init --path "<your-path-here>" 
            (generates a .env template without overwriting any existing one, unless forced):
            To force overwrite an existing .env file, add the --force flag: 
                                            labrarag-env-init --path "<your-path-here>" --force
            For more help: labrarag-env-init --help

CONFIGURE YOUR .env FILE:
    Fill in your custom values as required for database connection, OpenAI keys, etc.

Launch the GUI:
    Navigate to the directory containing static/app.py and run: python static/app.py
        - This will start the web application for interacting with your vector store.

USAGE
Document Management:
    Upload: Add PDF or .txt files to collections.
    Group: Organize files by topics or any category, creating and selecting collections.
    Search: Use the OpenAI chatbot to query your database. You can select one or more collections to target for your questions.
    Delete:
    Select a collection by dropdown.
    View all files in that collection.
    Delete individual files, or delete the collection (only possible if empty).
    Library Functions
    Programmatic utility functions for developers are available.

Documentation: See the internal Labra Teams channel for full documentation.
Support & Documentation
Function Documentation: Internal Labra Teams channel.

Issues & Bugs:
    - To fix: If you accidentally add duplicate files to a collection, deleting one will delete all.

Acknowledgements
-Built with LangChain
-Utilizes PostgreSQL and pgvector
-OpenAI chat completion integration

Happy building! If you have any questions or need help, consult your internal Labra support resources.

*This project is intended for internal use. External dissemination or open-source release may require review.*
