langflow
langflow copied to clipboard
feat: Enhance HuggingFace Embeddings Inference component
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
https://github.com/user-attachments/assets/dab21db8-f1bb-4119-b944-07656d95a652