We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62e314a commit 1af3e00Copy full SHA for 1af3e00
packages/inference/src/lib/makeRequestOptions.ts
@@ -243,6 +243,10 @@ function makeUrl(params: {
243
}
244
default: {
245
const baseUrl = HF_HUB_INFERENCE_PROXY_TEMPLATE.replaceAll("{{PROVIDER}}", "hf-inference");
246
+ if (params.taskHint && ["feature-extraction", "sentence-similarity"].includes(params.taskHint)) {
247
+ /// when deployed on hf-inference, those two tasks are automatically compatible with one another.
248
+ return `${baseUrl}/pipeline/${params.taskHint}/${params.model}`;
249
+ }
250
if (params.taskHint === "text-generation" && params.chatCompletion) {
251
return `${baseUrl}/models/${params.model}/v1/chat/completions`;
252
0 commit comments