lmstudio-ai / lmstudio.js

LM Studio TypeScript SDK (pre-release public alpha)
https://lmstudio.ai/docs/lmstudio-sdk/quick-start
Apache License 2.0
271 stars 42 forks source link

Feature Request: Embedding model support #36

Open christianazinn opened 3 weeks ago

christianazinn commented 3 weeks ago

Currently neither lmstudio-js nor lms appear to support embedding models. They are listed with lms ls but have no option to load with lms load or the TypeScript library. I'd like to have embeddings support for lmstudio-js for better integration of embeddings into TypeScript apps. This should approximately entail the ability to load embedding models and query the API with some kind of embed function which takes a string list and returns a list of float lists (or more accurately, a kind of EmbeddingsPredictionResult with that as its content field - I don't think the endpoint supports streaming so no need for an OngoingPrediction).