-
Notifications
You must be signed in to change notification settings - Fork 253
fix: OpenAIEmbeddingSpec setup check for multi endpoint #568
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
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #568 +/- ##
===================================
Coverage 85% 85%
===================================
Files 38 38
Lines 2982 2990 +8
===================================
+ Hits 2538 2546 +8
Misses 444 444 🚀 New features to boost your workflow:
|
|
hi @rongfengliang, thank you for creating the PR! Moving with version New: api = EmbeddingLitAPI(spec=ls.OpenAIEmebeddingSpec())
server = ls.Server(api)Old: api = EmbeddingLitAPI()
server = ls.Server(api, spec=ls.OpenAIEmebeddingSpec()) |
|
@aniketmaurya that's true, but currently OpenAIEmbeddingSpec in setup check use server.lit_api , lit_api maybe a list, this pr will check if server.lit_api is one or multi also Old design maybe not very good. LitAPI use LitSpec maybe LitSpec also add LitAPI instance so ,LitSpec will not use server instance, this will be better for checking some functions (like OpenAIEmbeddingSpec check async or sync code ) |
|
@rongfengliang cool let's do this for now. Can you please add a unit test here too? Maybe pass litapi both as a list and a single instance to LitServe and |
for more information, see https://pre-commit.ci
|
@aniketmaurya I had added the Unit test |
Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: Bhimraj Yadav <[email protected]>
|
I was thinking a bit more about this, and something came to mind — ideally, it might be cleaner if the spec only needs to check the specific LitAPI instance it's attached to, rather than handling a list. Maybe this could be abstracted better via the connector. cc: @aniketmaurya |
What does this PR do?
Fixes # (issue).
The OpenAIEmbeddingSpec currently only checks if server.lit_api is set to one. However, LitServe now supports multiple Endpoint , so this PR adds the necessary checks for multiple Endpoint.