> For the complete documentation index, see [llms.txt](https://corman.gitbook.io/smartgpt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://corman.gitbook.io/smartgpt/usage.md).

# Usage

## Installation

Prerequisites: [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)

1. Clone the Repository.

```
git clone https://github.com/Cormanz/smartgpt.git
```

Alternatively, [create a Github Codespace](https://github.com/codespaces/new?hide_repo_select=true\&ref=main\&repo=626190057) and run it there.

2. Run it your first time with `cargo run --release`, which will auto-generate a `config.yml`.
3. Fill in and optionally modify your `config.yml`, then run it again.

### With Docker

1. Install [`docker compose`](https://docs.docker.com/compose/install/linux/), preferably the latest stable version.
2. Clone the repository with `git clone https://github.com/Cormanz/smartgpt.git && cd smartgpt`.
3. Build the docker image with: `docker compose build`
4. Run it in release mode `docker compose run --rm smartgpt`. This will create a `config.yml` for you.
5. Adjust the config to your liking, and execute it once again.

## Local Models

SmartGPT has experimental support for local models using our `llm-rs` integration. Anywhere where you see `llm:`, you can try to swap in a local model:

```yaml
local:
    type: llama # llama / bloom / gpt2 / gptj / neox
    model path: PATH
    context tokens: 2048
    mmap: true #optional
```
