huggingface / swift-transformers

Swift Package to implement a transformers-like API in Swift
Apache License 2.0
536 stars 46 forks source link

feat: Support custom endpoint #57

Closed maiqingqiang closed 3 months ago

maiqingqiang commented 3 months ago

Resolving the issue of some regions being unable to access https://huggingface.co

maiqingqiang commented 3 months ago

Thanks a lot! This is very useful, I only have one question about changing the property name. If anything, I'd remove hf from hfToken rather than adding it to endpoint.

I also think using endpoint is better. So, should I change hfToken to token on my end?

pcuenca commented 3 months ago

I also think using endpoint is better. So, should I change hfToken to token on my end?

I'd love that, but hfToken is already in the init signature, so we could break other people's code if we change it. Coming to think of it, let's keep endpoint for the same reason, if that's ok 🙏

maiqingqiang commented 3 months ago

I also think using endpoint is better. So, should I change hfToken to token on my end?

I'd love that, but hfToken is already in the init signature, so we could break other people's code if we change it. Coming to think of it, let's keep endpoint for the same reason, if that's ok 🙏

Resolved