deepset-ai / haystack-core-integrations

Additional packages (components, document stores and the likes) to extend the capabilities of Haystack version 2.0 and onwards
https://haystack.deepset.ai
Apache License 2.0
121 stars 119 forks source link

feat: Raise error when attempting to embed empty documents/strings with Nvidia embedders #1118

Closed shadeMe closed 1 month ago

shadeMe commented 1 month ago

Proposed Changes:

Nvidia (Nim) embedding endpoints will raise an error if empty strings are passed to them. This PR adds checks to the document and text embedder components to prevent that.

Additionally improves error handling in the Nim backend by displaying the remote response in the error message.

How did you test it?

Unit tests

Checklist