# Embedding setup embedding_provider = config.get("embedding_provider", "default") if embedding_provider == "huggingface": from llama_index.embeddings.huggingface import HuggingFaceEmbedding embedding_name = config.get("embedding_name") if not embedding_name: raise ValueError( "Embedding name must be specified for Hugging Face embeddings." ) EMBED_MODEL = HuggingFaceEmbedding(model_name=embedding_name) Settings.embed_model = EMBED_MODEL elif embedding_provider == "default": # Use default embedding (e.g., OpenAI) pass else: raise ValueError(f"Unsupported embedding_provider: {embedding_provider}")