Giter VIP home page Giter VIP logo

llm-import-and-document-postgres-schema's Introduction

Python scripts to import database schema information from different data sources into a custom database.

Prerequisites

  • Python 3.8+
  • pip
  • Source db (postgres, snowflake, etc.)
  • Destination db (your custom db)

Installing

  1. Clone the repository to your local machine.

    git clone https://github.com/betocmn/LLM-import-and-document-postgres-schema.git
  2. Install all requirements

    pip3 install -r requirements.txt
  3. Use the env.example file to create a .env and fill it out.

Usage

Import from a Postgres source

  1. Start by generating a new organization_id and importing all basic schema from the source. This command will output an "organization_id" that you will need next.

    python3 scripts/import_from_postgres.py
  2. Generate the AI documentation for all tables and columns. The first argument is the "organization_id" from before and the second is the number of tables to generate (because openAI requests take a while, you might want to do in chunks).

    python3 scripts/document_from_postgres.py 8 30
  3. Generate the LLM embeddings for this new org. The argument is the "organization_id" from before.

    python3 scripts/generate_embeddings.py 8

llm-import-and-document-postgres-schema's People

Contributors

betocmn avatar

Watchers

 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.