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

feat: Enhance HuggingFace Embeddings Inference component #3758

Merged
merged 6 commits into from
Sep 12, 2024

Conversation

edwinjosechittilappilly
Copy link
Collaborator

Description

This PR enhances the HuggingFaceInferenceAPIEmbeddings component to improve its functionality, error handling, and support for local/remote inference deployments.

Key Changes

  • Updated component display name and description for better clarity
  • Added API URL validation method to ensure valid URLs
  • Implemented local URL detection for easier local deployments
  • Added support for dummy API key when using local URLs
  • Improved error handling for API key and URL requirements
  • Updated documentation link to the official HuggingFace HuggingFace Text Embeddings Inference (TEI) Documentation: https://huggingface.co/docs/text-embeddings-inference/local_gpu

Benefits

  • Improved user experience with clearer component description
  • Enhanced error messages for easier troubleshooting

Testing

  • Tested with both local API URLs
  • Verified error handling for invalid inputs
Screen.Recording.2024-09-10.at.9.31.47.PM.mov

Enhance HuggingFaceInferenceAPIEmbeddings component

- Update display name and description for clarity
- Add API URL validation method
- Implement local URL detection and dummy API key for local deployments
- Improve error handling for API key and URL requirements
- Update documentation link
@edwinjosechittilappilly edwinjosechittilappilly added the enhancement New feature or request label Sep 11, 2024
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Sep 11, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Sep 11, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3758.dmtpw4p5recq1.amplifyapp.com

Copy link
Collaborator

@jordanrfrazier jordanrfrazier left a comment

Choose a reason for hiding this comment

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

Added some suggestions! Good work, and amazing job on the PR description.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 12, 2024
- Update base class from LCModelComponent to LCEmbeddingsModel
- Rename 'api_url' to 'inference_endpoint' for clarity
- Improve error messages and validation for inference endpoint
- Update documentation link
- Enhance comments and code formatting
@edwinjosechittilappilly edwinjosechittilappilly removed the request for review from ogabrielluiz September 12, 2024 17:02
@edwinjosechittilappilly
Copy link
Collaborator Author

@jordanrfrazier can you help me out why certain CI Checks are failing ?

@edwinjosechittilappilly edwinjosechittilappilly merged commit 8275306 into main Sep 12, 2024
29 checks passed
@edwinjosechittilappilly edwinjosechittilappilly deleted the fix-huggingface-components branch September 12, 2024 19:55
smatiolids pushed a commit to smatiolids/langflow-dev that referenced this pull request Sep 16, 2024
…#3758)

# Enhance HuggingFaceInferenceAPIEmbeddings component

## Initial enhancements
- Update display name and description for clarity
- Add API URL validation method
- Implement local URL detection and dummy API key for local deployments
- Improve error handling for API key and URL requirements
- Update documentation link

## API key info update
- Updated the info in API key input

## Refactor and improvements
- Update base class from LCModelComponent to LCEmbeddingsModel
- Rename 'api_url' to 'inference_endpoint' for clarity
- Improve error messages and validation for inference endpoint
- Update documentation link
- Enhance comments and code formatting
diogocabral pushed a commit to headlinevc/langflow that referenced this pull request Nov 26, 2024
…#3758)

# Enhance HuggingFaceInferenceAPIEmbeddings component

## Initial enhancements
- Update display name and description for clarity
- Add API URL validation method
- Implement local URL detection and dummy API key for local deployments
- Improve error handling for API key and URL requirements
- Update documentation link

## API key info update
- Updated the info in API key input

## Refactor and improvements
- Update base class from LCModelComponent to LCEmbeddingsModel
- Rename 'api_url' to 'inference_endpoint' for clarity
- Improve error messages and validation for inference endpoint
- Update documentation link
- Enhance comments and code formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
2 participants