Closed carlosbravoa closed 7 months ago
And after that, it asked me to install chromadb.
Hey @carlosbravoa , do you mind sharing what sample you are trying to run when you encountered this issue?
i tried the amazon-bedrock-chat-poc, it works smoothly on M1 with my miniconda env. you'd better to point out which example you tried. @carlosbravoa
Sorry for the oversight! It was: Amazon-Bedrock-GenAI-Dynamic-Prompting-Explained-POC Thanks!
Hey @carlosbravoa can you try pulling down the latest version of the repo, I believe I addressed this issue :)
Just to clarify the reason you need sentence transformers and chromadb is for two similar but different things. Some of the PoCs are using a dynamic prompting technique, leveraging a semantic similarity search based on a database of stored prompts.
When the app is initially started, it uses sentence-transformers and pulls down an embeddings model from hugging face. This model is then used to create embeddings of all your sample prompts, and stores them in a vector database (ChromaDB) in memory.
Each time you make a query, an embedding of your query is created, you do a KNN search against chromaDB, and it returns the three most semantically similar prompts, and injects those into the final prompt along with your question into Bedrock.
If you wanted, you could replace the hugging face embeddings model with an amazon bedrock based embeddings model, but since the one provided is free, we thought it was the best fit.
Hopefully this clarifies things!
I just followed up the quickstart, created the venv, and installed the requirements.txt file As soon as you launch it and start prompting you get an error with sentence-transformers not installed.
So I installed it with:
pip install sentence-transformers
but ended with a plethora of dependencies installed that are irrelevant to the case such as CUDA (I don't even have an NVIDIA GPU), safetensors, scikitlearn and huggingface-hub. If the models run on Bedrock and this is just APIs, there is something wrong somewhere.Thanks!