Skip to content
🏡 Start Here

Embedbase

Open-source API & SDK to connect any data to ChatGPT

The search bar below is build with Embedbase. Try it out!

Powered by Embedbase
Copy/paste one of the example below into the search bar:
  • What can you build with Embedbase?
  • What is Embedbase?
  • How can I insert data into Embedbase using the Javascript SDK?

Quick tour

Interactive playground

Tutorial

To immediately use embedbase we provide an hosted API that you can use for free. Here is how to quickly use embedbase to hook your data to ChatGPT:

import { createClient } from 'embedbase-js'
const embedbase = createClient('https://api.embedbase.xyz', '<grab me here https://app.embedbase.xyz/>')
const ads = [
    'Discover Harem Pants! Unique, stylish bohemian vibes with loose legs. Comfy meets chic - elevate your wardrobe. Limited stock - shop now!.',
    'Introducing our fabulous Fringe Skirt! Step out in style with eye-catching fringe detailing that adds flair and movement. Perfect for any occasion, create unforgettable memories with this chic piece.',
    'Introducing the Gingham Dress: Timeless & Chic! 💕 Step into summer with this must-have, two-toned checkered dress. From picnics to parties, it\'s your go-to look. Shop now for unbeatable style!',
]
const datasetId = 'product-ads'
const data = await embedbase.dataset(datasetId).batchAdd(ads.map((data) => ({ data })))
console.log(data)
[
  {
    id: '9ced909f95e08e71a08bf6729be33dedc6793258c011989d5da9dd67b257509e',
    data: 'Discover Harem Pants! Unique, stylish bohemian vibes with loose legs. Comfy meets chic - elevate your wardrobe. Limited stock - shop now!.',
    embedding: [0.1, 0.2, 0.3, ...]
    ...
  },
  {
    id: '2fd991008424b2eb0354b040cd65ca1b8dc4deae941ec3c0abe6987ab6b2c7d1',
    data: 'Introducing our fabulous Fringe Skirt! Step out in style with eye-catching fringe detailing that adds flair and movement. Perfect for any occasion, create unforgettable memories with this chic piece.',
    embedding: [0.1, 0.2, 0.3, ...]
    ...
  },
  {
    id: '4dcba3c9311b76cf90b9cc4bf68e1524802e7345e6ec20de73941b86f53a5e33',
    data: 'Introducing the Gingham Dress: Timeless & Chic! 💕 Step into summer with this must-have, two-toned checkered dress. From picnics to parties, it\'s your go-to look. Shop now for unbeatable style!',
    embedding: [0.1, 0.2, 0.3, ...]
    ...
  }
]

Now that you have your data in Embedbase, you can ask ask questions to ChatGPT about your data:

const question = 'im looking for a nice pant that is comfortable and i can both use for work and for climbing'
const context = await embedbase.dataset(datasetId).createContext(question)
const prompt = 
    `Based on the following context:\n${context}\nAnswer the user's question: ${question}`
for await (const res of embedbase.generate(prompt)) {
    console.log(res)
}
You might want to try our Harem Pants! They have loose legs for comfort,
and their unique bohemian style can elevate your wardrobe for work.
However, please note that they may not be the most suitable for climbing.

Installation

npm i embedbase-js

Note: embedbase cloud will stay free for open-source projects. If you want to use Embedbase for a commercial project, please contact us at ben@embedbase.xyz

Learn more

SectionDescription
SDKs documentation (opens in a new tab)The Embedbase JS and Python SDKs
Self-hosting quick tour (opens in a new tab)Run embedbase locally in Python