Skip to Content
IntegrationsLlamaIndexQuickstart

LlamaIndex Quickstart

Build powerful RAG applications with Endee vector database and LlamaIndex. This guide will walk you through installation, setup, and creating your first vector index.

Requirements

  • Python 3.8 or higher
  • An Endee account (sign up at Endee Dashboard )
  • OpenAI API key (for embeddings)

Installation

Install the Endee LlamaIndex integration package:

pip install endee-llamaindex

Note: This will automatically install endee and llama-index as dependencies.

Setting up Credentials

Configure your API credentials for Endee and OpenAI:

import os from llama_index.embeddings.openai import OpenAIEmbedding # Set API keys os.environ["OPENAI_API_KEY"] = "your-openai-api-key" endee_api_token = "your-endee-api-token"

Tip: Store your API keys in environment variables for production use.

Initialize Endee Vector Store

Set up the Endee vector store and connect it to LlamaIndex:

from endee_llamaindex import EndeeVectorStore from llama_index.core import StorageContext import time # Create a unique index name timestamp = int(time.time()) index_name = f"llamaindex_demo_{timestamp}" # Set up the embedding model embed_model = OpenAIEmbedding() # Initialize the Endee vector store vector_store = EndeeVectorStore.from_params( api_token=endee_api_token, index_name=index_name, dimension=1536, # OpenAI's default embedding dimension space_type="cosine" # Can be "cosine", "l2", or "ip" ) # Create storage context with our vector store storage_context = StorageContext.from_defaults(vector_store=vector_store) print(f"Initialized Endee vector store with index: {index_name}")

Configuration Options

ParameterTypeDescriptionDefault
api_tokenstrYour Endee API tokenRequired
index_namestrName of the indexRequired
dimensionintVector dimensionRequired
space_typestrDistance metric"cosine"
batch_sizeintVectors per API call100

Distance Metrics

MetricBest For
cosineText embeddings, normalized vectors
l2Image features, spatial data
ipRecommendation systems, dot product similarity

Next Steps

Now that you have your vector store set up, learn how to: