Skip to content

Commit f8d52d5

Browse files
committed
🦺 Better detect url vs model name
1 parent 24e8a27 commit f8d52d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎packages/inference/src/lib/makeRequestOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function makeRequestOptions(
3838
}
3939
}
4040

41-
const url = /^http(s?):/.test(model) ? model : `${HF_INFERENCE_API_BASE_URL}${model}`;
41+
const url = /^http(s?):/.test(model) || model.startsWith("/") ? model : `${HF_INFERENCE_API_BASE_URL}${model}`;
4242
const info: RequestInit = {
4343
headers,
4444
method: "POST",

0 commit comments

Comments
 (0)