Repository navigation
Replies: 3 comments
|
Hey @IsmailCSV it looks like the Llama.CPP integration with Haystack only supports the ChatGenerator currently. I'd recommend opening an issue in this repo https://github.com/deepset-ai/haystack-core-integrations requesting support for embedding models hosted through Llama.cpp! |
|
llama.cpp's server speaks OpenAI embeddings. Point Haystack at that, not at a local Hugging Face embedder class. from haystack.components.embedders import OpenAITextEmbedder, OpenAIDocumentEmbedder
embedder = OpenAITextEmbedder(
api_base_url="http://HOST:8080/v1",
api_key="sk-not-used",
model="your-embed-model-name",
)Same idea for
Check with |
|
llama.cpp's server speaks the OpenAI embeddings API, so point Haystack's OpenAI embedders at it — verified against One correction to the snippet above: from haystack.components.embedders import OpenAIDocumentEmbedder, OpenAITextEmbedder
from haystack.utils import Secret
# Query side
query_embedder = OpenAITextEmbedder(
api_base_url="http://HOST:8080/v1",
api_key=Secret.from_token("sk-no-key-needed"),
model="your-embed-model-name", # must match the model id llama-server registered
)
# Indexing side (same server, document variant)
doc_embedder = OpenAIDocumentEmbedder(
api_base_url="http://HOST:8080/v1",
api_key=Secret.from_token("sk-no-key-needed"),
model="your-embed-model-name",
)Pre-checks before running:
Longer term, per @sjrl above, native embedding support doesn't exist in the |
Uh oh!
There was an error while loading. Please reload this page.
Hello, I had previously created a pipeline using a local embedder that I just downloaded through Huggingface now I am trying to use an embedder that is hosted on a server through Llamacpp. I've done tons of research and have tried to utilize ChatGPT, but I cannot find an answer. I am hoping there is anyone here that could help or guide me in the right direction on how to achieve this.
All reactions