Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: Repair embeddings/llamacpp's embed_query method #29935

Merged
merged 2 commits into from
Feb 23, 2025

Conversation

JulienElkaim
Copy link
Contributor

Description: As commented on the commit 41b6a86 it introduced a bug for when we do an embedding request and the model returns a non-nested list. Typically it's the case for model nomic-embed-text.

  • I added the unit test, and ran make format, make lint and make test from the community package.
  • No new dependency.

Copy link

vercel bot commented Feb 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Feb 23, 2025 7:28pm

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. community Related to langchain-community Ɑ: embeddings Related to text embedding models module 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Feb 23, 2025
JulienElkaim referenced this pull request Feb 23, 2025
…8827)

- **Description:** `embed_documents` and `embed_query` was throwing off
the error as stated in the issue. The issue was that `Llama` client is
returning the embeddings in a nested list which is not being accounted
for in the current implementation and therefore the stated error is
being raised.
- **Issue:** #28813

---------

Co-authored-by: Chester Curme <[email protected]>
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Feb 23, 2025
@ccurme ccurme enabled auto-merge (squash) February 23, 2025 19:28
@ccurme ccurme merged commit e586bff into langchain-ai:master Feb 23, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature community Related to langchain-community Ɑ: embeddings Related to text embedding models module lgtm PR looks good. Use to confirm that a PR is ready for merging. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants