huggingface / text-generation-inference

Large Language Model Text Generation Inference
http://hf.co/docs/text-generation-inference
Apache License 2.0
8.96k stars 1.06k forks source link

Add /v1/models API endpoint to be compatible with OpenAI APIs #2369

Closed ktrapeznikov closed 1 month ago

ktrapeznikov commented 2 months ago

Feature request

Add /v1/models/ endpoint to list model information. This will basically same info as /info endpoint just compliant with OpenAI APIs

Motivation

Lot of other tools expect /v1/models to list the available models.

Your contribution

I can try submitting a PR

ErikKaum commented 2 months ago

Hi @ktrapeznikov 👋

To me this makes sense. If you have time making a PR please feel free to go ahead 🙌

Simon-Stone commented 2 months ago

This would be very helpful to my use case, too!

ErikKaum commented 2 months ago

Awesome 🙌 we're quite constrained on bandwidth at the moment. But once we get to this it should be a quick thing to implement.

Also, if you have the time please feel free to submit a PR 👍