-
Notifications
You must be signed in to change notification settings - Fork 538
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
True OpenAI drop-in replacement by InferenceClient #2384
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, very clear docs! Thanks @Wauplin
from experience, a very tough test to pass usually 🤣 EDIT: PR looks cool! |
Thanks for the reviews! |
Closes #2369 @lappemic
Goal is to be able to use
InferenceClient
exactly the same way asOpenAI
client. To do so we need to:model
tobase_url
=> added an alias for itmodel_id
tomodel
token
toapi_key
=> added an alias for itclient.chat.completions.create
@philschmid could you have a look at it and confirm it meets your expectations? See tests for real example (here and here)
Sync +
stream=False
Sync +
stream=True
Async +
stream=False
Async +
stream=True
TODO: