def _get_embedding_model(cls, sync: schemas.Sync) -> BaseEmbeddingModel:
        """Get embedding model instance.

        If OpenAI API key is available, it will use OpenAI embeddings instead of local.

        Args:
            sync (schemas.Sync): The sync configuration

        Returns:
            BaseEmbeddingModel: The embedding model to use
        """
        # Use OpenAI if API key is available
        from airweave.core.logging import logger

        if settings.OPENAI_API_KEY:
            logger.info(f"Using OpenAI embedding model (text-embedding-3-small) for sync {sync.id}")
            return OpenAIText2Vec(api_key=settings.OPENAI_API_KEY)

        # Otherwise use the local model
        logger.info(f"Using local embedding model (MiniLM-L6-v2) for sync {sync.id}")
        return LocalText2Vec()
Get embedding model instance.

        If OpenAI API key is available, it will use OpenAI embeddings instead of local.

        Args:
            sync (schemas.Sync): The sync configuration

        Returns:
            BaseEmbeddingModel: The embedding model to use
        
backend/airweave/platform/sync/factory.py