Why pipeline/feature-extraction API does not work?
#115
by
gkwan-guides-3
- opened
Before several days ago, I had no problem to use sentence-transformers/all-MiniLM-L6-v2 with langchain4j by using free account. Suddenly, it does not work. In my investigation, I found the following:
- The model API still work fine by the following command:
curl -L \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HF_API_KEY" \
https://api-inference.huggingface.co/models/sentence-transformers/all-MiniLM-L6-v2 \
-d '{"inputs": { "source_sentence": "hello", "sentences": ["I like you.", "I love you"] } }'
- The pipeline/feature-extraction API does not work. The post data may not be right. I expect at least an error, so that I know the API is working, but it returns Not Found.
curl -L \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HF_API_KEY" \
https://api-inference.huggingface.co/pipeline/feature-extraction/sentence-transformers/all-MiniLM-L6-v2 \
-d '{"inputs": ["hello"] }'
Is the pipeline/feature-extraction down? Or is there any change to cause the API not work anymore?
Hello!
Apologies for the inconvenience, my understanding is that the API URL has changed to:
- https://router.huggingface.co/hf-inference/models/sentence-transformers/all-MiniLM-L6-v2/pipeline/sentence-similarity
- https://router.huggingface.co/hf-inference/models/sentence-transformers/all-MiniLM-L6-v2/pipeline/feature-extraction
Depending on which task you prefer for this model. These endpoints should still work for you.
- Tom Aarsen
Thanks. It works.
gkwan-guides-3
changed discussion status to
closed
gkwan-guides-3
changed discussion status to
open