Skip to main content

embed

Function embed 

Source
pub async fn embed(
    client: &dyn LlmClient,
    text: &str,
) -> Result<Vec<f32>, Error>
Expand description

Generate a text embedding vector using the configured LLM provider.

Thin pass-through to LlmClient::embed: no batching, normalization, or retry. Symmetric with crate::complete().

Returns Err(Error::Unsupported) for providers without an embeddings endpoint (e.g. AnthropicClient).