Skip to content

fix(hf): Upgrade @huggingface/inference to v3.15.0 #8237

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YasharF
Copy link

@YasharF YasharF commented May 22, 2025

Changes:

  • Upgrade @huggingface/inference from v2.6.4 to v3.15.0.
  • Migrated from HfInference to InferenceClient.
  • Removed deprecated HfInferenceEndpoint.
  • Added a provider parameter as it is required for the new @huggingface/inference version. The parameter can also be set using HUGGINGFACEHUB_PROVIDER environment variable.
  • Fixed broken integration test, and added a new test for when the new provider parameter is used.
  • Updated documentation accordingly.

Other Improvements:

  • The model parameter now supports being set via the HUGGINGFACEHUB_MODEL environment variable, in addition to the constructor argument.
  • If no model is provided, a warning is logged that the default BAAI/bge-base-en-v1.5 is used.

Fixes # #8148

x: YasharF3
linkedin.com/in/yasharf

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 22, 2025
Copy link

vercel bot commented May 22, 2025

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 28, 2025 4:35am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) May 28, 2025 4:35am

@dosubot dosubot bot added auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder auto:improvement Medium size change to existing code to handle new use-cases labels May 22, 2025
@YasharF YasharF force-pushed the hf_upgrade branch 2 times, most recently from 9d25082 to ef3c6f5 Compare May 22, 2025 22:20
Changes:
- Migrated from HfInference to InferenceClient.
- Added a provider parameter as it is required for the new version. The parameter can also be set using HUGGINGFACEHUB_PROVIDER environment variable.
- Updated documentation accordingly
- Fixed broken integration test, and added a new test for when the new provider parameter is used.

Other Improvements:
- The model parameter now supports being set via the HUGGINGFACEHUB_MODEL environment variable, in addition to the constructor argument.
- If no model is provided, a warning is logged that the default `BAAI/bge-base-en-v1.5` is used.
@YasharF YasharF changed the title fix(hf): Upgrade @huggingface/inference to v3.13.2 fix(hf): Upgrade @huggingface/inference to v3.15.0 May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:documentation Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder auto:improvement Medium size change to existing code to handle new use-cases size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant