Skip to content

Commit

Permalink
🦺 Better detect url vs model name
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed Apr 18, 2023
1 parent 24e8a27 commit f8d52d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/inference/src/lib/makeRequestOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function makeRequestOptions(
}
}

const url = /^http(s?):/.test(model) ? model : `${HF_INFERENCE_API_BASE_URL}${model}`;
const url = /^http(s?):/.test(model) || model.startsWith("/") ? model : `${HF_INFERENCE_API_BASE_URL}${model}`;
const info: RequestInit = {
headers,
method: "POST",
Expand Down

0 comments on commit f8d52d5

Please sign in to comment.