async def _get_embeddings(
        self, entity_dicts: List[str], sync_context: SyncContext, entity_context: str
    ) -> List[List[float]]:
        """Get embeddings from the embedding model."""
        import asyncio
        import inspect

        embedding_model = sync_context.embedding_model
        loop = asyncio.get_event_loop()
        cpu_start = loop.time()

        # Get embeddings from the model with entity context
        if hasattr(embedding_model, "embed_many"):
            # Check if the embedding model supports entity_context parameter
            embed_many_signature = inspect.signature(embedding_model.embed_many)
            if "entity_context" in embed_many_signature.parameters:
                embeddings = await embedding_model.embed_many(
                    entity_dicts, entity_context=entity_context
                )
            else:
                embeddings = await embedding_model.embed_many(entity_dicts)
        else:
            embeddings = await embedding_model.embed_many(entity_dicts)

        cpu_elapsed = loop.time() - cpu_start
        sync_context.logger.info(
            f"Vector computation completed in {cpu_elapsed:.2f}s for {len(embeddings)} entities"
        )

        return embeddings
Get embeddings from the embedding model.
backend/airweave/platform/sync/entity_processor.py