Skip to content

Conversation

@drbh
Copy link
Collaborator

@drbh drbh commented Aug 19, 2024

This PR adds a new endpoitns /v1/models that returns data similar to /info. This aims to align with openai's models endpoint, however in the TGI case we'll always return a single model

curl 127.0.0.1:3000/v1/models 
{
    "object": "list",
    "data": [
        {
            "id": "meta-llama/Meta-Llama-3-8B ",
            "object": "model",
            "created": 0,
            "owned_by": "meta-llama/Meta-Llama-3-8B "
        }
    ]
}

https://platform.openai.com/docs/api-reference/models/list

resolves: #2369

@drbh drbh force-pushed the support-openai-models-endpoint branch from 93194a5 to 8398d4f Compare August 27, 2024 00:22
Copy link
Contributor

@Narsil Narsil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Narsil Narsil merged commit d5202c4 into main Aug 29, 2024
@Narsil Narsil deleted the support-openai-models-endpoint branch August 29, 2024 14:32
@drbh
Copy link
Collaborator Author

drbh commented Aug 29, 2024

Tagging @Wauplin for visibility since this adds a new endpoint/docs

Narsil pushed a commit that referenced this pull request Aug 29, 2024
* feat: add /v1/models endpoint

* feat: add /v1/models endpoint

* fix: remove unused type import

* fix: revert route typo

* fix: update docs with new endpoint

* fix: add to redocly ignore and lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants