@huggingface/inference 3.3.6 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +2 -0
  2. package/dist/index.cjs +339 -174
  3. package/dist/index.js +339 -174
  4. package/dist/src/lib/getProviderModelId.d.ts +1 -1
  5. package/dist/src/lib/getProviderModelId.d.ts.map +1 -1
  6. package/dist/src/lib/makeRequestOptions.d.ts +2 -2
  7. package/dist/src/lib/makeRequestOptions.d.ts.map +1 -1
  8. package/dist/src/providers/black-forest-labs.d.ts +2 -1
  9. package/dist/src/providers/black-forest-labs.d.ts.map +1 -1
  10. package/dist/src/providers/cohere.d.ts +19 -0
  11. package/dist/src/providers/cohere.d.ts.map +1 -0
  12. package/dist/src/providers/consts.d.ts.map +1 -1
  13. package/dist/src/providers/fal-ai.d.ts +2 -1
  14. package/dist/src/providers/fal-ai.d.ts.map +1 -1
  15. package/dist/src/providers/fireworks-ai.d.ts +2 -1
  16. package/dist/src/providers/fireworks-ai.d.ts.map +1 -1
  17. package/dist/src/providers/hf-inference.d.ts +3 -0
  18. package/dist/src/providers/hf-inference.d.ts.map +1 -0
  19. package/dist/src/providers/hyperbolic.d.ts +2 -1
  20. package/dist/src/providers/hyperbolic.d.ts.map +1 -1
  21. package/dist/src/providers/nebius.d.ts +2 -1
  22. package/dist/src/providers/nebius.d.ts.map +1 -1
  23. package/dist/src/providers/novita.d.ts +2 -1
  24. package/dist/src/providers/novita.d.ts.map +1 -1
  25. package/dist/src/providers/replicate.d.ts +3 -1
  26. package/dist/src/providers/replicate.d.ts.map +1 -1
  27. package/dist/src/providers/sambanova.d.ts +2 -1
  28. package/dist/src/providers/sambanova.d.ts.map +1 -1
  29. package/dist/src/providers/together.d.ts +2 -1
  30. package/dist/src/providers/together.d.ts.map +1 -1
  31. package/dist/src/tasks/custom/request.d.ts +2 -4
  32. package/dist/src/tasks/custom/request.d.ts.map +1 -1
  33. package/dist/src/tasks/custom/streamingRequest.d.ts +2 -4
  34. package/dist/src/tasks/custom/streamingRequest.d.ts.map +1 -1
  35. package/dist/src/tasks/nlp/featureExtraction.d.ts +2 -9
  36. package/dist/src/tasks/nlp/featureExtraction.d.ts.map +1 -1
  37. package/dist/src/types.d.ts +25 -4
  38. package/dist/src/types.d.ts.map +1 -1
  39. package/package.json +2 -2
  40. package/src/lib/getProviderModelId.ts +4 -4
  41. package/src/lib/makeRequestOptions.ts +74 -186
  42. package/src/providers/black-forest-labs.ts +26 -2
  43. package/src/providers/cohere.ts +42 -0
  44. package/src/providers/consts.ts +2 -1
  45. package/src/providers/fal-ai.ts +24 -2
  46. package/src/providers/fireworks-ai.ts +28 -2
  47. package/src/providers/hf-inference.ts +43 -0
  48. package/src/providers/hyperbolic.ts +28 -2
  49. package/src/providers/nebius.ts +34 -2
  50. package/src/providers/novita.ts +31 -2
  51. package/src/providers/replicate.ts +30 -2
  52. package/src/providers/sambanova.ts +28 -2
  53. package/src/providers/together.ts +34 -2
  54. package/src/tasks/audio/audioClassification.ts +1 -1
  55. package/src/tasks/audio/audioToAudio.ts +1 -1
  56. package/src/tasks/audio/automaticSpeechRecognition.ts +1 -1
  57. package/src/tasks/audio/textToSpeech.ts +1 -1
  58. package/src/tasks/custom/request.ts +2 -4
  59. package/src/tasks/custom/streamingRequest.ts +2 -4
  60. package/src/tasks/cv/imageClassification.ts +1 -1
  61. package/src/tasks/cv/imageSegmentation.ts +1 -1
  62. package/src/tasks/cv/imageToImage.ts +1 -1
  63. package/src/tasks/cv/imageToText.ts +1 -1
  64. package/src/tasks/cv/objectDetection.ts +1 -1
  65. package/src/tasks/cv/textToImage.ts +1 -1
  66. package/src/tasks/cv/textToVideo.ts +1 -1
  67. package/src/tasks/cv/zeroShotImageClassification.ts +1 -1
  68. package/src/tasks/multimodal/documentQuestionAnswering.ts +1 -1
  69. package/src/tasks/multimodal/visualQuestionAnswering.ts +1 -1
  70. package/src/tasks/nlp/chatCompletion.ts +1 -1
  71. package/src/tasks/nlp/chatCompletionStream.ts +1 -1
  72. package/src/tasks/nlp/featureExtraction.ts +3 -10
  73. package/src/tasks/nlp/fillMask.ts +1 -1
  74. package/src/tasks/nlp/questionAnswering.ts +1 -1
  75. package/src/tasks/nlp/sentenceSimilarity.ts +1 -1
  76. package/src/tasks/nlp/summarization.ts +1 -1
  77. package/src/tasks/nlp/tableQuestionAnswering.ts +1 -1
  78. package/src/tasks/nlp/textClassification.ts +1 -1
  79. package/src/tasks/nlp/textGeneration.ts +3 -3
  80. package/src/tasks/nlp/textGenerationStream.ts +1 -1
  81. package/src/tasks/nlp/tokenClassification.ts +1 -1
  82. package/src/tasks/nlp/translation.ts +1 -1
  83. package/src/tasks/nlp/zeroShotClassification.ts +1 -1
  84. package/src/tasks/tabular/tabularClassification.ts +1 -1
  85. package/src/tasks/tabular/tabularRegression.ts +1 -1
  86. package/src/types.ts +29 -2
package/README.md CHANGED
@@ -56,6 +56,7 @@ Currently, we support the following providers:
56
56
  - [Sambanova](https://sambanova.ai)
57
57
  - [Together](https://together.xyz)
58
58
  - [Blackforestlabs](https://blackforestlabs.ai)
59
+ - [Cohere](https://cohere.com)
59
60
 
60
61
  To send requests to a third-party provider, you have to pass the `provider` parameter to the inference function. Make sure your request is authenticated with an access token.
61
62
  ```ts
@@ -80,6 +81,7 @@ Only a subset of models are supported when requesting third-party providers. You
80
81
  - [Replicate supported models](https://huggingface.co/api/partners/replicate/models)
81
82
  - [Sambanova supported models](https://huggingface.co/api/partners/sambanova/models)
82
83
  - [Together supported models](https://huggingface.co/api/partners/together/models)
84
+ - [Cohere supported models](https://huggingface.co/api/partners/cohere/models)
83
85
  - [HF Inference API (serverless)](https://huggingface.co/models?inference=warm&sort=trending)
84
86
 
85
87
  ❗**Important note:** To be compatible, the third-party API must adhere to the "standard" shape API we expect on HF model pages for each pipeline task type.