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 a dropped crotch & 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',
    status: 'success'
  },
  {
    id: '2fd991008424b2eb0354b040cd65ca1b8dc4deae941ec3c0abe6987ab6b2c7d1',
    status: 'success'
  },
  {
    id: '4dcba3c9311b76cf90b9cc4bf68e1524802e7345e6ec20de73941b86f53a5e33',
    status: 'success'
  }
]

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

import { Configuration, OpenAIApi } from 'openai'
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}`
const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
})
const openai = new OpenAIApi(configuration);
const completion = await openai.createChatCompletion({
    model: 'gpt-3.5-turbo',
    messages: [{ role: 'user', content: prompt }],
})
console.log(completion.data.choices[0].message?.content)
You might want to try our Harem Pants! They have a dropped crotch and 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
ℹī¸

For OpenAI installation, please refer to their documentation (opens in a new tab).

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
Javascript SDK (opens in a new tab)The Embedbase Javascript SDK
Python SDK (opens in a new tab)The Embedbase Python SDK