Code Monkey home page Code Monkey logo

map-gpt-embeddings's Introduction

map-gpt-embeddings Singer Map Transformer

Inline mapper for splitting documents and calculating OpenAI embeddings, for purposes of building vectorstore knowledge base usable by GPT and ChatGPT.

Built with the Meltano Tap SDK for Singer Taps.

See also

  1. https://github.com/meltanolabs/tap-beautifulsoup - [Coming soon!] A tap for scraping web content from ReadTheDocs and other websites.
  2. https://github.com/meltanolabs/target-chromadb - A Singer target that can be used to load documents and embeddings created by this library.
  3. https://github.com/meltanolabs/gpt-ext - A Meltano utility which can be used to chat with the documents after they are loaded into the vector store.

Prereqs

Before using this tap for ReadTheDocs, you first need to download the site locally using wget:

% MY_RTD_SITE=sdk.meltano.com
% wget -r -A.html https://${MY_RTD_SITE}/en/latest/

Configuration

Accepted Config Options

A full list of supported settings and capabilities for this tap is available by running:

map-gpt-embeddings --about

Configure using environment variables

This Singer tap will automatically import any environment variables within the working directory's .env if the --config=ENV is provided, such that config values will be considered if a matching environment variable is set either in the terminal context or in the .env file.

OpenAI Authentication and Authorization

You will need an OpenAI API Key to calculate embeddings using OpenAI's models. Free accounts are rate limited to 60 calls per minute. This is different from ChatGPT Plus account and requires a per-API call billing method established with OpenAI.

Usage

You can easily run map-gpt-embeddings by itself or in a pipeline using Meltano.

Executing the Tap Directly

map-gpt-embeddings --version
map-gpt-embeddings --help
map-gpt-embeddings --config CONFIG --discover > ./catalog.json

Developer Resources

Follow these instructions to contribute to this project.

Initialize your Development Environment

pipx install poetry
poetry install

Create and Run Tests

Create tests within the map_gpt_embeddings/tests subfolder and then run:

poetry run pytest

You can also test the map-gpt-embeddings CLI interface directly using poetry run:

poetry run map-gpt-embeddings --help

Testing with Meltano

Note: This tap will work in any Singer environment and does not require Meltano. Examples here are for convenience and to streamline end-to-end orchestration scenarios.

Next, install Meltano (if you haven't already) and any needed plugins:

# Install meltano
pipx install meltano
# Initialize meltano within this directory
cd map-gpt-embeddings
meltano install

Now you can test and orchestrate using Meltano:

# Test invocation:
meltano invoke map-gpt-embeddings --version
# OR run a test `elt` pipeline:
meltano elt map-gpt-embeddings target-jsonl

SDK Dev Guide

See the dev guide for more instructions on how to use the SDK to develop your own taps and targets.

map-gpt-embeddings's People

Contributors

aaronsteers avatar meltybot avatar reubenfrankel avatar pnadolny13 avatar

Forkers

danielpdwalker

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.