Git Product home page Git Product logo

markprompt's Introduction

Markprompt โ€“ Open-source GPT-4 platform for Markdown, Markdoc and MDX with built-in analytics

Markprompt

Markprompt is a platform for building GPT-powered prompts. It scans Markdown, Markdoc and MDX files in your GitHub repo and creates embeddings that you can use to create a prompt, for instance using the companion Markprompt React or Web component. Markprompt also offers analytics, so you can gain insights on how visitors interact with your docs.



Twitter NPM version License

Documentation

To use the Markprompt platform as is, please refer to the Markprompt documentation.

Self-hosting

Markprompt is built on top of the following stack:

Supabase

Supabase is used for storage and auth, and if self-hosting, you will need to set it up on the Supabase admin console.

Schema

The schema is defined in schema.sql. Create a Supabase database and paste the content of this file into the SQL editor. Then run the Typescript types generation script using:

npx supabase gen types typescript --project-id <supabase-project-id> --schema public > types/supabase.ts

where <supabase-project-id> is the id of your Supabase project.

Auth provider

Authentication is handled by Supabase Auth. Follow the Login with GitHub and Login with Google guides to set it up.

Setting environment variables

A sample file containing required environment variables can be found in example.env. In addition to the keys for the above services, you will need keys for Upstash (rate limiting and key-value storage), Plain.com (support chat), and Fathom (analytics).

Using the React and Web components

Markprompt comes with React and Web components that make it easy to build a prompt interface on top of the Markprompt API. With a single line of code, you can provide a prompt interface to your React application. Follow the steps in the Markprompt docs to get started, or explore the source code.

Also, try out the Markprompt starter template for a fully working Next.js + Tailwind project.

Usage

Currently, the Markprompt API has basic protection against misuse when making requests from public websites, such as rate limiting, IP blacklisting, allowed origins, and prompt moderation. These are not strong guarantees against misuse though, and it is always safer to expose an API like Markprompt's to authenticated users, and/or in non-public systems using private access tokens. We do plan to offer more extensive tooling on that front (hard limits, spike protection, notifications, query analysis, flagging).

Data retention

OpenAI keeps training data for 30 days. Read more: OpenAI API data usage policies.

Markprompt keeps the data as long as you need to query it. If you remove a file or delete a project, all associated data will be deleted immediately.

Community

Authors

Created by the team behind Motif (@motifland).

markprompt's People

Contributors

hb1998 avatar just-moh-it avatar khairulhaaziq avatar kyh avatar michaelfester avatar nickrttn avatar ramirond avatar remcohaszing avatar schneegansm 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.