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

Create shared openai-compatible inference adapter #193

Open
russellb opened this issue Oct 5, 2024 · 2 comments
Open

Create shared openai-compatible inference adapter #193

russellb opened this issue Oct 5, 2024 · 2 comments

Comments

@russellb
Copy link
Contributor

russellb commented Oct 5, 2024

There are multiple open PRs looking to add inference adapters for services that offer OpenAI-compatible APIs.

These adapters all use the OpenAI client and have the same config options (a URL and API key).

Options for moving forward:

  1. Create a single shared adapter for OpenAI-compatible API endpoints.
  2. If some cases require additional unique configuration, most of the code could be shared.
@ashwinb
Copy link
Contributor

ashwinb commented Oct 6, 2024

I support creating a shared code but not a shared adapter. I think implementation quality in terms of faithfulness of precise token-level behavior (on the backend) varies so it is best if we keep a top-level fork but share underlying code where it makes sense. I also plan to put together a set of tests which test tool calling behavior and other corner-case behavior we know can be problematic.

Please do hold off on doing this work for a couple days. There's some impending refactors incoming. I will be merging some PRs in the meantime to avoid duplicate work on behalf of the providers.

@terrytangyuan
Copy link

terrytangyuan commented Oct 6, 2024

@ashwinb I have put together some work on this before noticing this issue and your comment: #195

Is it possible to merge that effort and then move them to reusable code in a separate PR (or as part of your incoming impending refactors) if a shared adapter is not preferred? It's a working adapter. This will unblock some of our existing tasks and avoid duplicating work.

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

No branches or pull requests

3 participants