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

Add Cohere provider #1202

Merged
merged 4 commits into from
Feb 27, 2025
Merged

Conversation

alexrs-cohere
Copy link
Contributor

What

Adds Cohere as an inference provider.

Test Plan

Added new tests for Cohere both with and without streaming.

What Should Reviewers Focus On?

Is the implementation correct? Anything important that I missed? Also happy to get feedback on the code, I am a bit rusty with my JS!

@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.

Copy link
Contributor

@SBrandeis SBrandeis left a comment

Choose a reason for hiding this comment

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

Looks good, thank you so much!
I took the liberty to factor some cohere-specific types into the providers/cohere file

Test failure is unrelated to the current PR

@@ -7375,6 +7375,59 @@
}
}
},
"772e481d98640490fca3aab8e7fed5b771ea213f2b76b2f8858ce7bc90acb16b": {
Copy link
Contributor

@SBrandeis SBrandeis Feb 21, 2025

Choose a reason for hiding this comment

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

FYI: You can update the tapes file by running:

VCR_MODE=cache pnpm run test

Copy link
Contributor

@SBrandeis SBrandeis left a comment

Choose a reason for hiding this comment

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

Very nice 🔥 Thank you for implementing an OpenAI-compatible API!
Looks good to me, let's merge!

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Much cleaner this way! Thanks for making the effort on your side 🤗

@SBrandeis SBrandeis merged commit 2f02968 into huggingface:main Feb 27, 2025
5 checks passed
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.

5 participants