Class: HuggingFace::BaseApi
- Inherits:
-
Object
- Object
- HuggingFace::BaseApi
- Defined in:
- lib/hugging_face/base_api.rb
Direct Known Subclasses
Constant Summary collapse
- HTTP_SERVICE_UNAVAILABLE =
503
- JSON_CONTENT_TYPE =
'application/json'
Instance Method Summary collapse
-
#initialize(api_token:) ⇒ BaseApi
constructor
A new instance of BaseApi.
Constructor Details
#initialize(api_token:) ⇒ BaseApi
Returns a new instance of BaseApi.
10 11 12 13 14 15 |
# File 'lib/hugging_face/base_api.rb', line 10 def initialize(api_token:) @headers = { 'Authorization' => 'Bearer ' + api_token, 'Content-Type' => JSON_CONTENT_TYPE } end |