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.55k stars 1.65k forks source link

Environment variable and documentation inconsistency #2642

Closed olariuromeo closed 1 week ago

olariuromeo commented 1 week ago

LocalAI version:

Maybe more than one Environment, CPU architecture, OS, and Version:

Any Describe the bug

There appears to be an inconsistency between the documentation and the .env file on GitHub for LocalAI and other portions of code. In the documentation at https://localai.io/basics/build/, for example, it shows MODELS_PATH=/models, while the actual .env file on GitHub (https://github.com/mudler/LocalAI/blob/master/.env) specifies LOCALAI_MODELS_PATH=/models.

This example highlights a broader issue where many other variables within the configuration may also show inconsistencies. It suggests a disconnect between the individuals responsible for writing the documentation and those configuring the .env file. It appears they may not be on the same page in terms of understanding and implementing the application’s setup.

The developer should be aware that there is no validated documentation for all software versions. If these variables are changed in different versions, it should be clearly specified in the documentation for each respective version.

Such discrepancies can lead to confusion for users attempting to configure the system based on the provided documentation. In software development, clear and consistent communication is crucial to ensure that documentation accurately reflects the actual implementation. Without this alignment, users may encounter challenges in effectively utilizing the software.

If you are involved with this project, it could be beneficial to address these inconsistencies with the team responsible for documentation and configuration. By resolving and harmonizing these details, you can enhance the user experience and improve the overall usability of LocalAI.

Working in such a disorganized manner, where inconsistencies between documentation and code persist, can lead to an exponential growth in the list of errors on GitHub. Without clear and consistent documentation across different software versions, developers may encounter significant challenges in maintaining and understanding the project. It's crucial for developers to leverage their expertise to ensure that changes in variables and configurations are well-documented across different versions of the software. This proactive approach not only enhances clarity but also improves the overall maintainability and longevity of the project.

I don't think artificial intelligence can be built with disorganized software. In fact, nothing can be built this way, it's just a waste of time.

To Reproduce

Just broswe the docs and github prepo Expected behavior

Logs

Additional context

olariuromeo commented 1 week ago

Example of an Error in the Latest Version: WARNING: The MODELS_PATH variable is not set. Defaulting to a blank string.

When using LOCALAI_MODELS_PATH instead of LOCALAI_PARALLEL_REQUESTS, both variables exist in the code. This code is very confusing and disorganized. I've never seen anything like it before.

mudler commented 1 week ago

@olariuromeo - wow just for the tone of this issue I'm really keen to not even answer it.

First: this project is completely OSS and contributors works on this by their own free time - second - Software changes with time, and we had many iterations on environment variables, and that's why there can be misalignment with docs. It is really hard to keep documentation and code tight together.

to answer your question - both LOCAL_AI_MODELS_PATH and MODELS_PATH works because, while MODELS_PATH is marked for deprecation, all environment variables have been moved to have LOCALAI as prefix.

there are no incongruousness - both variable works and you can see that also by running the binary --help.