fabric icon indicating copy to clipboard operation
fabric copied to clipboard

feat: Add LM Studio compatibility

Open verebes1 opened this issue 1 week ago • 0 comments

What this Pull Request (PR) does

This PR adds LM Studio compatibility. Now this can be used side by side with OpenAI no need for changing URLs in the .env file to make it work

  • Added LM Studio as a new plugin, now it can be used with Fabric.
  • Updated the plugin registry with the new plugin name
  • Updated the configuration with the required base url

Related issues

closes #[928] A lot of credit goes to @sosacrazy126 as this is based on his solution.

How to test

  1. Clone the repo git clone https://github.com/verebes1/fabric.git
  2. Enter the project dir cd fabric
  3. Install the project go install
  4. Run LM Studio and its local webserver with a model of your choice
  5. Run fabric --setup and setup your local url for LM Studio alternatively you can also add the url yourself to your .env file to fabric's settings LM_STUDIO_API_BASE_URL=http://localhost:1234/v1
  6. Check the models fabric --listmodels
  7. Try it out echo "Tell me a story about golang?" | fabric -sp ai -m YOUR_MODEL_LOADED_IN_LM_STUDIO

Screenshots

Screenshot 2025-02-17 at 23 33 47

verebes1 avatar Feb 17 '25 23:02 verebes1