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

fix: improved the huggingface emdeddings component, to handle local inference and serverless inference #6292

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

edwinjosechittilappilly
Copy link
Collaborator

This pull request includes several updates to the src/backend/base/langflow/components/embeddings/huggingface_inference_api.py file, focusing on improving the handling of API keys and local URLs for HuggingFace embeddings. The most important changes include updating the advanced setting for the API key input, expanding the list of local URLs, and modifying the default API key for local deployment.

Improvements to API key handling:

Enhancements to local URL handling:

  • def create_huggingface_embeddings(: Expanded the list of local URLs to include http://0.0.0.0 and http://docker, and added a check to ensure huggingface.co is not in the URL for local deployment.
  • def create_huggingface_embeddings(: Modified the default API key for local deployment from DummyAPIKeyForLocalDeployment to APIKeyForLocalDeployment for better clarity.

Additional comments:

  • Added a comment to use langchain_huggingface in the next update.

https://www.loom.com/share/1e6885358434465a94ef72ea38ec4eec?sid=d2a8c171-fb05-499f-8364-7fb51350828d

@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Feb 11, 2025
@edwinjosechittilappilly edwinjosechittilappilly marked this pull request as ready for review February 12, 2025 05:55
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 12, 2025
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 12, 2025
@edwinjosechittilappilly edwinjosechittilappilly added this pull request to the merge queue Feb 12, 2025
Merged via the queue into main with commit 553e3a0 Feb 12, 2025
48 of 50 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the hugging-face-embeddings branch February 12, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer 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