Issue Using LlamaCppEmbedding with Chroma Class #7480
Replies: 1 comment
-
Hello, @yesesuljoo! I'm here to help you with any bugs, questions, or contributions you have. Let's see if we can tackle this issue together. The issue you're encountering is likely due to the To resolve this, you can ensure that the
These approaches should help you align the output of To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
Example Code
Description
I am trying to use the
Chroma
class from@langchain/community/vectorstores/chroma
with multiple embedding functions. While testing, I noticed that it works correctly withAzureOpenAIEmbeddings
, but I encounter an error when usingLlamaCppEmbedding
.It seems the issue arises because the
embedDocuments
method inLlamaCppEmbedding
returns tokenized values of the input text instead of mapped embedding vectors. ForAzureOpenAIEmbeddings
, theembedDocuments
method always returns fixed-dimension embedding vectors for any given input, but forLlamaCppEmbedding
, the dimensions of the returned vectors vary depending on the input text.I suspect this inconsistency is causing the error when adding documents to
Chroma
usingaddDocuments
. Has anyone experienced similar issues or found a workaround?I am attaching the error message below.
Thanks in advance for your help!
System Info
"@langchain/community": "^0.3.16",
"@langchain/openai": "0.2.11",
Beta Was this translation helpful? Give feedback.
All reactions