kambo-1st / huggingface-php

inference.huggingface
21 stars 3 forks source link

Update to use 'Bearer' HTTP header instead of 'Authorization' #2

Open chrishow opened 8 months ago

chrishow commented 8 months ago

HuggingFace API was returning this message:

Authorization header is invalid, use 'Bearer API_TOKEN'

I assume they have changed their auth code since this library was written.

Furthermore, the HttpTransporter was throwing a string, but ErrorException requires an array.

This should close issue #1