Adding sources

Sources represent the data that is accessible by the language model during a conversation. We currently support the following source types:

  • text (raw text)
  • file (e.g. PDF, Word, Powerpoint, see full list of supported file types here)
  • url (one or more website URLs)

You can add sources from the dashboard, or by making a request to the API. For this example, let's add information about an imaginary island that we can ask questions about (written by GPT):

const source = await chariot.createSource({
  name: 'Imaginary island',
  type: 'text',
  content: `Blue Bay, an imaginary 533-acre island, is home to 2013 residents, 
    with a unique weather pattern that brings snow only on Tuesdays. Its 
    botanical richness flourishes under purple rain showers, while a 
    radiant rainbow reef teems with colorful fish. Once a year, the island 
    hosts the Firefly Festival in May.`,
  application_id: '{YOUR_APPLICATION_ID}',


Chariot automatically generates the embeddings for each source and stores them in a vector database.

You can check the embed status of your source by polling the sources endpoint using the source id. The response will include the source's embed_status:


  "id": "src_M3NGQ3yQ",
  "embed_status": "PENDING",

Once the embed_status equals SUCCESS, the source is ready to be used in a conversation. This can take a few minutes depending on the size of the source.