library(openalexVectorComp)
backend <- backend_config(
provider = "tei",
base_url = "http://localhost:3000"
)
emb <- embed_texts(
texts = c("Title: A\nAbstract: B", "Title: C\nAbstract: D"),
backend = backend
)
dim(emb)This vignette documents TEI server operations outside the package:
openalexVectorComp no longer manages TEI process lifecycle internally.
text-embeddings-router --model-id BAAI/bge-small-en-v1.5 --port 3000text-embeddings-router --model-id BAAI/bge-small-en-v1.5 --port 3001curl -s http://localhost:3000/healthcurl -s http://localhost:3000/infocurl -s -X POST http://localhost:3000/embed \
-H "Content-Type: application/json" \
-d '{"inputs":["hello world"]}'library(openalexVectorComp)
backend <- backend_config(
provider = "tei",
base_url = "http://localhost:3000"
)
emb <- embed_texts(
texts = c("Title: A\nAbstract: B", "Title: C\nAbstract: D"),
backend = backend
)
dim(emb)If TEI is running in a terminal, stop with Ctrl+C.
If running in background:
pkill -f text-embeddings-routerOr find PID and stop explicitly:
ps aux | grep text-embeddings-router
kill <PID>systemd, supervisord, or container runtime).Use another port and update backend config accordingly.
curl smoke test directly against /embed.max_batch_size in backend_config().batch_size in embed_corpus() where feasible./info.