Overview
SIE provides three integration paths: native SDK for full feature access, framework adapters for RAG pipelines, and OpenAI compatibility for drop-in migration.
Integration Options
Section titled “Integration Options”| Option | Features | Best For |
|---|---|---|
| Framework Adapters | Dense, sparse, reranking, extraction | LangChain, LlamaIndex, Haystack, DSPy, CrewAI, Chroma |
| Native SDK | All features, full control | Custom pipelines, advanced use cases |
| OpenAI Compatibility | Dense only | Migrating existing OpenAI code |
Framework Adapters
Section titled “Framework Adapters”SIE provides native packages for six frameworks. Each adapter exposes embeddings, and most include reranking support.
| Framework | Package | Embeddings | Sparse | Reranking |
|---|---|---|---|---|
| LangChain | sie-langchain | Yes | Yes | Yes |
| LlamaIndex | sie-llamaindex | Yes | Yes | Yes |
| Haystack | sie-haystack | Yes | Yes | No |
| DSPy | sie-dspy | Yes | No | No |
| CrewAI | sie-crewai | No | Yes | No |
| Chroma | sie-chroma | Yes | Yes | No |
Use framework adapters when:
- You’re building a RAG pipeline with one of these frameworks
- You need sparse embeddings for hybrid search
- You need reranking to improve retrieval quality
Native SDK
Section titled “Native SDK”The native SDK provides full access to all SIE features: dense, sparse, multi-vector embeddings, reranking, and entity extraction.
pip install sie-sdkpnpm add @sie/sdkfrom sie_sdk import SIEClientfrom sie_sdk.types import Item
client = SIEClient("http://localhost:8080")
# All output typesresult = client.encode( "BAAI/bge-m3", Item(text="Your text"), output_types=["dense", "sparse", "multivector"])
# Rerankingscores = client.score( "BAAI/bge-reranker-v2-m3", query=Item(text="What is AI?"), items=[Item(text="AI is..."), Item(text="Weather is...")])
# Entity extractionentities = client.extract( "urchade/gliner_multi-v2.1", Item(text="Tim Cook leads Apple."), labels=["person", "organization"])import { SIEClient } from "@sie/sdk";
const client = new SIEClient("http://localhost:8080");
// All output typesconst result = await client.encode( "BAAI/bge-m3", { text: "Your text" }, { outputTypes: ["dense", "sparse", "multivector"] });
// Rerankingconst scores = await client.score( "BAAI/bge-reranker-v2-m3", { text: "What is AI?" }, [{ text: "AI is..." }, { text: "Weather is..." }]);
// Entity extractionconst entities = await client.extract( "urchade/gliner_multi-v2.1", { text: "Tim Cook leads Apple." }, { labels: ["person", "organization"] });
await client.close();Use the native SDK when:
- You’re building a custom pipeline without a framework
- You need multi-vector (ColBERT) output
- You need entity extraction
- You want fine-grained control over batching and timing
OpenAI Compatibility
Section titled “OpenAI Compatibility”SIE exposes /v1/embeddings matching OpenAI’s API format. Existing OpenAI code works with a URL change.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="not-needed")
response = client.embeddings.create( model="BAAI/bge-m3", input=["Your text here", "Another text"])
for item in response.data: print(f"Index {item.index}: {len(item.embedding)} dimensions")import OpenAI from "openai";
const client = new OpenAI({ baseURL: "http://localhost:8080/v1", apiKey: "not-needed",});
const response = await client.embeddings.create({ model: "BAAI/bge-m3", input: ["Your text here", "Another text"],});
for (const item of response.data) { console.log(`Index ${item.index}: ${item.embedding.length} dimensions`);}Use OpenAI compatibility when:
- You have existing code using the OpenAI SDK
- You only need dense embeddings
- You want zero code changes beyond the URL
Limitations: Only dense embeddings. No sparse, multi-vector, reranking, or extraction.
Feature Comparison
Section titled “Feature Comparison”| Feature | Framework Adapters | Native SDK | OpenAI Compat |
|---|---|---|---|
| Dense embeddings | Yes | Yes | Yes |
| Sparse embeddings | Most | Yes | No |
| Multi-vector (ColBERT) | No | Yes | No |
| Reranking | LangChain, LlamaIndex | Yes | No |
| Entity extraction | No | Yes | No |
What’s Next
Section titled “What’s Next”- LangChain - embeddings and reranking for LangChain
- LlamaIndex - embeddings and reranking for LlamaIndex
- Haystack - dense and sparse embedders
- DSPy - embedder for DSPy retrievers
- CrewAI - sparse embeddings for hybrid search
- Chroma - embedding functions for ChromaDB
- SDK Reference - full SDK documentation