Text embedding library that converts text into vector representations. Part of the unified LLM interface, supporting multiple providers and models.
local llm = require("llm")
-- Single text
local response = llm.embed("Text to embed", {
model = "text-embedding-3-large"
})
-- Multiple texts
local texts = {"Text 1", "Text 2"}
local response = llm.embed(texts, {
model = "text-embedding-3-large",
dimensions = 1536
})Used for semantic search, document similarity, and applications requiring text vector representations.