Vector stores and embeddings
Choose where knowledge-base documents are stored and which model creates their embeddings. Leave both unset to use Postgres and the embedding model on your subscription.
You can set this once on the client, or pass it on addDocument, updateDocument, deleteDocument, getDocument, listDocuments, and search.
Set it once
serverConfig on the notifier applies to later knowledge calls on that client. Pass it in the constructor, or assign it later. Set it to null to use the defaults again.
notifier.serverConfig = {
vectorStore: { provider: "postgres" },
embedding: {
provider: "ollama",
baseUrl: "http://127.0.0.1:11434",
model: "nomic-embed-text",
},
};vectorStoreConfig is another name for vectorStore. embeddingConfig is another name for embedding. Use either name on the client or on a call.
Override one call
Pass vectorStore or embedding on that call. Each one overrides only itself: a store on the call keeps the embedding you already set, and an embedding on the call keeps the store you already set.
await notifier.search({
senderId: "user-123",
query: "refund timeline",
vectorStore: {
provider: "pinecone",
apiKey: process.env.PINECONE_API_KEY,
host: process.env.PINECONE_HOST,
},
});A serverConfig object on the call applies to that call only.
Include dimensions when the embedding model should use a specific size.
Vector stores
provider
Also accepted
Required
Defaults
postgres
Omit the object
β
Platform Postgres. Keyword and hybrid search are available
pinecone
β
apiKey, and host or index
namespace optional
weaviate
β
host
apiKey optional. className defaults to RagChunk
qdrant
β
host
apiKey optional. collection defaults to rag_chunks
azure_search
azure, azure_ai_search
endpoint, apiKey
index defaults to rag-chunks. apiVersion defaults to 2024-07-01
s3_vectors
aws, aws_s3, s3, s3vectors, amazon_s3_vectors
accessKeyId, secretAccessKey, and either indexArn or both vectorBucket and index
region defaults to us-east-1. sessionToken optional
Keyword and hybrid search are available with Postgres. Use the other stores for semantic search.
Embedding providers
Omit embedding to use the model on your subscription.
provider
Also accepted
Default model
Notes
open_ai
β
text-embedding-3-small
azure_ai
azure, azure_openai
none
deploymentName is required when model is omitted
gemini
google
text-embedding-004
bedrock
aws, aws_bedrock, amazon_bedrock
amazon.titan-embed-text-v2:0
region defaults to us-east-1
hugging_face
huggingface
sentence-transformers/all-MiniLM-L6-v2
ollama
β
nomic-embed-text
No API key. Uses this model instead of the subscription model
cohere
β
embed-english-v3.0
voyage
voyageai, voyage_ai
voyage-3
mistral
mistral_ai
mistral-embed
jina
jina_ai
jina-embeddings-v3
any other name
β
β
OpenAI-compatible endpoint. Provide apiKey and baseUrl
Example: local Weaviate and Ollama
Provider names, required fields, and default models are listed under Integrations.
Language guides
Next steps
Manage documents β index content into the store you selected
Semantic search β query that store
Last updated