Closed j-pielen closed 5 months ago
to use embedding-svc
you need to have instance of infinity API running. https://github.com/michaelfeil/infinity
Else, you can install additional requirements for embedder and use provider as mixed-bread.
Make sure to enable the provider from backend/embedder/__init__.py
Thanks for your response @S1LV3RJ1NX ! When embedding-svc is the default, and it's mandatory to use the infinity API, is there a part that I have missed in the readme?
Also when I want to use mixedbread as an provider, i got to the backend/embedder/init.py adjust the code as you mentioned like this:
if settings.OPENAI_API_KEY:
from langchain.embeddings.openai import OpenAIEmbeddings
register_embedder("openai", OpenAIEmbeddings)
register_embedder("truefoundry", TrueFoundryEmbeddings)
# Using embedding th' a deployed service such as Infinity API
register_embedder("embedding-svc", InfinityEmbeddingSvc)
# Register the MixBreadEmbeddings class if required
from backend.modules.embedder.mixbread_embedder import MixBreadEmbeddings
register_embedder("mixbread", MixBreadEmbeddings)
then the local.metadata.yaml like this:
collection_name: creditcard
data_source:
type: localdir
uri: sample-data/creditcards
parser_config:
chunk_size: 512
chunk_overlap: 40
parser_map:
".pdf": PdfTableParser
embedder_config:
provider: mixedbread
config:
model: "mixedbread-ai/mxbai-embed-large-v1"
but still get this error: ValueError: No embedder registered with provider mixedbread
Don't know whats going on, i have configured everything so it should work locally with ollama but this comes up while running
python3 -m local.ingest
My .env
local.metadata.yaml