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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenAI as a pluggable spec #72

Closed
lantiga opened this issue Apr 30, 2024 · 1 comment
Closed

Add OpenAI as a pluggable spec #72

lantiga opened this issue Apr 30, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lantiga
Copy link
Collaborator

lantiga commented Apr 30, 2024

馃殌 Feature

We should enable serving a model through a spec, without having to implement it manually in decode_request and encode_response. The spec (could be more than one) would:

  • expose a route
  • implement specific ways of decoding requests and encoding responses
  • require the API to expose certain kinds of information (e.g. token used)

in a way that is pluggable at the LitServer level (spec=OpenAISpec) and independent from the API implementation itself.

Motivation

We want to make it seamless for users to expose a model using one or more standard specs.

Pitch

I define a LitAPI subclass, call LitServer(api, spec=OpenAISpec, ...) and I will get an v1/chat/completions/ endpoint that behaves like an OpenAI compatible endpoint.

Alternatives

We subclass LitServer and LitAPI, but this would't compose cleanly down the road with other pieces we want to factor out (e.g. kvcache management).

@lantiga lantiga added enhancement New feature or request help wanted Extra attention is needed labels Apr 30, 2024
@lantiga
Copy link
Collaborator Author

lantiga commented May 23, 2024

Closed by #98 #100 #101

@lantiga lantiga closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant