Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
embedding
AI Agent
Embedding module for PraisonAI Agents.
This module provides a unified embedding API that can be used throughout
the praisonaiagents package. It consolidates embedding functionality that
was previously duplicated in memory.py and knowledge.py.
Usage:
>>> from praisonaiagents import embedding
>>> result = embedding(“Hello world”)
>>> print(result.embeddings[0][:5])
>>> from praisonaiagents.embedding import embedding, EmbeddingResult
>>> result = embedding([“Hello”, “World”])
>>> print(len(result))
2
The module uses lazy imports to avoid loading litellm until actually needed,
ensuring zero performance impact on import time.
Import
from praisonaiagents import embedding