fabric
fabric copied to clipboard
feat: Add LM Studio compatibility
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
- Clone the repo
git clone https://github.com/verebes1/fabric.git
- Enter the project dir
cd fabric
- Install the project
go install
- Run LM Studio and its local webserver with a model of your choice
- 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 settingsLM_STUDIO_API_BASE_URL=http://localhost:1234/v1
- Check the models
fabric --listmodels
- Try it out
echo "Tell me a story about golang?" | fabric -sp ai -m YOUR_MODEL_LOADED_IN_LM_STUDIO