Skip to main content

praisonaiagents.embedding

Core SDK 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.

Overview

This module provides components for embedding.