Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Make GET /v1/models compatible with OpenAI API. #1127

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

notsyncing
Copy link
Contributor

This PR add some fields according to https://platform.openai.com/docs/api-reference/models/list while retaining its original fields. Now I'm able to use xinference with https://github.com/open-webui/open-webui

@XprobeBot XprobeBot added the enhancement New feature or request label Mar 11, 2024
@XprobeBot XprobeBot added this to the v0.9.3 milestone Mar 11, 2024
@notsyncing notsyncing marked this pull request as draft March 11, 2024 14:27
@notsyncing
Copy link
Contributor Author

Looks like that we must break some use cases of this API to be compatible with OpenAI API. Any ideas? Merge this PR and break (or completely move to OpenAI API), or close this PR and keep its original state?

@notsyncing notsyncing marked this pull request as ready for review March 12, 2024 06:41
@qinxuye
Copy link
Contributor

qinxuye commented Mar 12, 2024

I think we should be compatible with OpenAI, if the behavior of CI is wrong, you can modify it.

@notsyncing
Copy link
Contributor Author

I decided to move it completely to OpenAI API format, because even we add the openai fields data and object to the response, it can interfere the users who are using len(response). So, I think it's better to break it completely, rather than a strange response which duplicates the data twice.

Tested with curl, xinference list and open-webui.

@ChengjieLi28 ChengjieLi28 merged commit c4b4f10 into xorbitsai:main Mar 14, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants