Semantic Search in MongoDB Atlas Vector using HuggingFace embedding models

Hi everyone,
I would like to know if it’s possible to run calls to HuggingFace API from an Atlas Vector trigger.
I would like to implement the functionality described in How to Do Semantic Search in MongoDB Using Atlas Vector Search | MongoDB but using HuggingFace API instead of OpenAI.
Thanks in advance!