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

Fix use other chat completion providers #2153

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Mar 25, 2024

Last minute fix thanks to @radames comment.

We should be able to use InferenceClient with other providers that are OpenAI-compatible. For example, InferenceClient(model="https://api.openai.com/v1/chat/completions") is valid. This PR fixes implementation for such APIs by not appending /chat/completions if it already exists.

Wauplin added 2 commits March 25, 2024 14:44

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@Wauplin Wauplin requested a review from LysandreJik March 25, 2024 13:49
@HuggingFaceDocBuilderDev

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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.79%. Comparing base (59be8f2) to head (32d2384).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2153      +/-   ##
==========================================
- Coverage   82.83%   82.79%   -0.05%     
==========================================
  Files         103      103              
  Lines        9666     9670       +4     
==========================================
- Hits         8007     8006       -1     
- Misses       1659     1664       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Wauplin Wauplin merged commit 9e13b83 into main Mar 25, 2024
16 checks passed
@Wauplin Wauplin deleted the fix-use-other-chat-completion-providers branch March 25, 2024 13:58
Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

lgtm

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.

None yet

4 participants