mudler / LocalAI

:robot: The free, Open Source OpenAI alternative. Self-hosted, community-driven and local-first. Drop-in replacement for OpenAI running on consumer-grade hardware. No GPU required. Runs gguf, transformers, diffusers and many more models architectures. It allows to generate Text, Audio, Video, Images. Also with voice cloning capabilities.
https://localai.io
MIT License
21.54k stars 1.65k forks source link

refactor: gallery inconsistencies #2647

Closed mudler closed 1 week ago

mudler commented 1 week ago

Description

This PR fixes few inconsistencies in the gallery code:

netlify[bot] commented 1 week ago

Deploy Preview for localai ready!

Name Link
Latest commit 0188d9a7e97885db7117bab479ef621f0a731af1
Latest deploy log https://app.netlify.com/sites/localai/deploys/667972cf2952aa00085f3c75
Deploy Preview https://deploy-preview-2647--localai.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

dave-gray101 commented 1 week ago

This is somewhat of a hypothetical still - but should we consider merging the core/gallery folder away into components under core/config and core/services? I've got to think about this for a few more minutes myself... but from my memory most of the code here is either related to the conversion between gallery configs and backend configs (which could potentially belong under config) and installation / download, which probably belongs within core/services/gallery.go?

mudler commented 1 week ago

This is somewhat of a hypothetical still - but should we consider merging the core/gallery folder away into components under core/config and core/services? I've got to think about this for a few more minutes myself... but from my memory most of the code here is either related to the conversion between gallery configs and backend configs (which could potentially belong under config) and installation / download, which probably belongs within core/services/gallery.go?

mmm good point yes, probably only request.go should be moved around as its re-used in many parts of the code. Maybe even schema? But I'm thinking probably we should actually have something like core/services/gallery, core/services/... at this point