Skip to content

Conversation

SBrandeis
Copy link
Contributor

@SBrandeis SBrandeis commented Jan 15, 2025

if (taskInfo) {
model = taskInfo.models[0].id;
let model: string;
if (!maybeModel) {
Copy link
Member

@coyotte508 coyotte508 Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add something like

if (maybeModel && URL.parse(maybeModel)) {
  throw new TypeError("model URLs are no longer supported, use endpointUrl instead")
}

(or a regex check since URL.parse may not be supported on some safari devices)

@SBrandeis SBrandeis marked this pull request as ready for review January 15, 2025 17:03
@SBrandeis SBrandeis merged commit 697e9be into main Jan 15, 2025
5 checks passed
@SBrandeis SBrandeis deleted the inference/refactor-make-requests branch January 15, 2025 17:50
aykutkardas pushed a commit to gokayfem/huggingface.js that referenced this pull request Jan 20, 2025
- Update the `makeRequestOptions` function to make the logic (hopefully)
more readable; especially since huggingface#1077
- Stop support of model URLs
- Update tapes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants