Zyan11/LocalAI-Amlan-Edition
5
1# Contributing to LocalAI2 3Thank you for your interest in contributing to LocalAI! We appreciate your time and effort in helping to improve our project. Before you get started, please take a moment to review these guidelines.4 5## Table of Contents6 7- [Getting Started](#getting-started)8 - [Prerequisites](#prerequisites)9 - [Setting up the Development Environment](#setting-up-the-development-environment)10- [Contributing](#contributing)11 - [Submitting an Issue](#submitting-an-issue)12 - [Creating a Pull Request (PR)](#creating-a-pull-request-pr)13- [Coding Guidelines](#coding-guidelines)14- [Testing](#testing)15- [Documentation](#documentation)16- [Community and Communication](#community-and-communication)17 18## Getting Started19 20### Prerequisites21 22- Golang [1.21]23- Git24- macOS/Linux25 26### Setting up the Development Environment and running localAI in the local environment27 281. Clone the repository: `git clone https://github.com/go-skynet/LocalAI.git`292. Navigate to the project directory: `cd LocalAI`303. Install the required dependencies ( see https://localai.io/basics/build/#build-localai-locally )314. Build LocalAI: `make build`325. Run LocalAI: `./local-ai`336. To Build and live reload: `make build-dev`34 35## Contributing36 37We welcome contributions from everyone! To get started, follow these steps:38 39### Submitting an Issue40 41If you find a bug, have a feature request, or encounter any issues, please check the [issue tracker](https://github.com/go-skynet/LocalAI/issues) to see if a similar issue has already been reported. If not, feel free to [create a new issue](https://github.com/go-skynet/LocalAI/issues/new) and provide as much detail as possible.42 43### Creating a Pull Request (PR)44 451. Fork the repository.462. Create a new branch with a descriptive name: `git checkout -b [branch name]`473. Make your changes and commit them.484. Push the changes to your fork: `git push origin [branch name]`495. Create a new pull request from your branch to the main project's `main` or `master` branch.506. Provide a clear description of your changes in the pull request.517. Make any requested changes during the review process.528. Once your PR is approved, it will be merged into the main project.53 54## Coding Guidelines55 56- No specific coding guidelines at the moment. Please make sure the code can be tested. The most popular lint tools like [`golangci-lint`](https://golangci-lint.run) can help you here.57 58## Testing59 60`make test` cannot handle all the model now. Please be sure to add a test case for the new features or the part was changed.61 62### Running AIO tests63 64All-In-One images has a set of tests that automatically verifies that most of the endpoints works correctly, a flow can be :65 66```bash67# Build the LocalAI docker image68make DOCKER_IMAGE=local-ai docker69 70# Build the corresponding AIO image71BASE_IMAGE=local-ai DOCKER_AIO_IMAGE=local-ai-aio:test make docker-aio72 73# Run the AIO e2e tests74LOCALAI_IMAGE_TAG=test LOCALAI_IMAGE=local-ai-aio make run-e2e-aio75```76 77## Documentation78 79We are welcome the contribution of the documents, please open new PR or create a new issue. The documentation is available under `docs/` https://github.com/mudler/LocalAI/tree/master/docs80 81### Gallery YAML Schema82 83LocalAI provides a JSON Schema for gallery model YAML files at:84 85`core/schema/gallery-model.schema.json`86 87This schema mirrors the internal gallery model configuration and can be used by editors (such as VS Code) to enable autocomplete, validation, and inline documentation when creating or modifying gallery files.88 89To use it with the YAML language server, add the following comment at the top of a gallery YAML file:90 91```yaml92# yaml-language-server: $schema=../core/schema/gallery-model.schema.json93```94 95## Community and Communication96 97- You can reach out via the Github issue tracker.98- Open a new discussion at [Discussion](https://github.com/go-skynet/LocalAI/discussions)99- Join the Discord channel [Discord](https://discord.gg/uJAeKSAGDy)100 