Improve validation and exception handling within the inference API.
Here are a few areas to get started
When a text embedding service is created, during the creation process we issue a short request to the external service to determine the dimensions. If we receive an error we should wrap that in some validation exception and provide a helpful error message depending on the failure that occurred.
For example if we get a failure back from hugging face it could mean that the user did not select the correct task type when initializing the HF inference endpoint (usually it needs to be Sentence Embedding).
If Cohere returns an error about the input_type field, it usually indicates that the user did not include that field when setting up the inference endpoint and they're using a v3 model.
Description
Improve validation and exception handling within the inference API.
Here are a few areas to get started
input_type
field, it usually indicates that the user did not include that field when setting up the inference endpoint and they're using a v3 model.