huggingface / huggingface.js

Utilities to use the Hugging Face Hub API
https://hf.co/docs/huggingface.js
MIT License
1.35k stars 197 forks source link

[Tasks] Spec: follow-up to #449 #463

Open SBrandeis opened 7 months ago

SBrandeis commented 7 months ago

TODO

This issue lists the remaining tasks following #449

"Bigger" changes:

Wauplin commented 7 months ago

(some comments I had)

"Bigger changes":

philschmid commented 7 months ago

I was looking into the first added schema and was a bit surprised that they do not match the API schema from inference Endpoints or the Inference API. I thought we wanted to create an external schema that can be used for code generation and other validation to make sure all libraries, API, etc have the same types.

When i looked into it i saw that the main input is called "data" and not "inputs". I also noticed that the "parameters" are "camelCase" and not "snake_case" (in the definitions), Some definitions, e.g. "text-generation" are only for TGI and not for the text-generation pipeline.

What's the plan here? I don't think we should maintain definitions that need to be adjusted again to work with our products. I thought we start with an API first approach to then integrate into the libraries.