Skip to main content

embedding

Function
This function is defined in the llm module.
Get embedding vector for text. .. deprecated:: Use from praisonai import embed or from praisonai.capabilities import embed instead. This function returns raw vectors; the new embed() returns EmbeddingResult with metadata.

Signature

Parameters

Any
required
Text string or list of strings to embed
Any
default:"'text-embedding-3-small'"
Embedding model name (default: text-embedding-3-small) **kwargs: Additional arguments passed to litellm.embedding()

Returns

Any
List[float] for single text, or List[List[float]] for multiple texts

Usage

Uses

  • warnings.warn
  • ImportError
  • litellm.embedding

Notes

Requires litellm. Install with: pip install praisonai[llm]

Used By

Source

View on GitHub

praisonai/llm/__init__.py at line 70