# Memory embedder integration with hugging face and mistral

**URL:** <https://community.crewai.com/t/memory-embedder-integration-with-hugging-face-and-mistral/4987>\
**Category:** CrewAI Community Support\
**Tags:** memory\
**Created:** [March 26, 2025, 1:42pm UTC](https://community.crewai.com/t/memory-embedder-integration-with-hugging-face-and-mistral/4987 "2025-03-26T13:42:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurpreet\_Grover](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/gurpreet_grover/32/3160_2.png) [@Gurpreet\_Grover](https://community.crewai.com/u/Gurpreet_Grover)\
**Post date:** [March 26, 2025, 1:42pm UTC](https://community.crewai.com/t/memory-embedder-integration-with-hugging-face-and-mistral/4987/1 "2025-03-26T13:42:09Z")

</div>

I am continuously failing to integrate embedding model from mistralAI to embedder in memory functionality.  
any assistance from your side will be much valuable

---

<div class="post-metadata">

**Author:** ![maxmoura](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/maxmoura/32/4206_2.png) [@maxmoura](https://community.crewai.com/u/maxmoura)\
**Post date:** [March 26, 2025, 4:15pm UTC](https://community.crewai.com/t/memory-embedder-integration-with-hugging-face-and-mistral/4987/2 "2025-03-26T16:15:49Z")

</div>

Full disclosure, I’m not a Mistral user myself, so take this response just as a pointer to the existing documentation, ok?

Internally, CrewAI uses the Embedchain library for its RAG tools, and this includes the available memory types. So, you should follow the same configuration approach used in Embedchain when setting up memories. You can check out the configuration details here:

- The [Embedchain documentation](https://docs.embedchain.ai/get-started/quickstart#open-source-models) provides an example configuration using Hugging Face and Mistral.
- The [CrewAI documentation on Memory](https://docs.crewai.com/concepts/memory#additional-embedding-providers) includes examples of using custom embedding providers.

---

<div class="post-metadata">

**Author:** ![Gurpreet\_Grover](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/gurpreet_grover/32/3160_2.png) [@Gurpreet\_Grover](https://community.crewai.com/u/Gurpreet_Grover)\
**Post date:** [March 27, 2025, 3:02am UTC](https://community.crewai.com/t/memory-embedder-integration-with-hugging-face-and-mistral/4987/3 "2025-03-27T03:02:06Z")

</div>

Thanks for Responding, @maxmoura

- In the first url you provided, i couldn’t find how can I integrate and use Embedchain and CrewAI, if you can assist with it, it would be helpful
- I had tried reffering to the CrewAI documentation before but was facing issues in integrating with Hugging Face as well as MistralAI for embedder, i don’t think I could explain that to you if you have tried neither yourself

Thanks again

#### Edit:

I was able to use MistralAI embedding model by reffering to [Mistral Docs](https://docs.mistral.ai/capabilities/embeddings/) and using “custom” provider in CrewAI  
pardon me for the novice query as it was my first time implicitly using embedding model with an LLM  
While I am still having trouble with using hugging face for embedding models  
These two are the error messages i am getting for that

1. 
##### using provider as “custom”

- ERROR:root:Error during short\_term search: text input must be of type `str` (single example), `List[str]` (batch or single pretokenized example) or `List[List[str]]` (batch of pretokenized examples). in query.

1. 
##### using provider as “huggingface”

- Expected embeddings to be a list of floats or ints, a list of lists, a numpy array, or a list of numpy arrays, got {‘error’: ‘Invalid username or password.’} in query.

i am not able to debug any of these two
