-
Notifications
You must be signed in to change notification settings - Fork 207
I've integrated the Rust backend for process management and API proxy- #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 9 commits
b382be7
4da3fe0
0cdd5a6
78a0911
84ce290
d4e59b6
0ac7c01
8938ea8
8297e10
1f7cb2f
9399c2a
bf3598e
009e03e
8f22f3f
1d156d3
09621db
8881db0
e9939b6
a7afd93
ea0364a
a9f9b55
c33b59d
9c92a01
cf98e74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # Deployment Guide: Running Amica Locally | ||
|
|
||
| This guide provides step-by-step instructions for setting up and running the Rust-powered version of Amica on your local machine. | ||
|
|
||
| ## 1. Prerequisites | ||
|
|
||
| Before you begin, you need to have the following software installed on your system: | ||
|
|
||
| * **Node.js:** Amica's user interface is built with Node.js. You will need version `18.18.0` or newer. You can download it from the [official Node.js website](https://nodejs.org/). | ||
| * **Rust:** The new backend is written in Rust. The easiest way to install Rust is by using `rustup`. You can find instructions at the [official Rust website](https://www.rust-lang.org/tools/install). | ||
| * **`text-generation-webui`:** You must have a working, pre-compiled version of `text-generation-webui`. You can find releases and setup instructions on its [GitHub repository](https://github.com/oobabooga/text-generation-webui). Make sure you can run it successfully on its own before integrating it with Amica. | ||
| * **(Linux Only) Build Dependencies:** On Linux, you will need to install a few extra packages for Tauri to build correctly. You can install them with the following command: | ||
| ```bash | ||
| sudo apt-get update | ||
| sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev | ||
| ``` | ||
AlphaEcho11 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| > **Note:** This project uses Tauri v1, which requires `libwebkit2gtk-4.0-dev`. If you are working on a project with Tauri v2 or newer, you will need to use `libwebkit2gtk-4.1-dev` instead. | ||
|
|
||
| ## 2. Installation and Configuration | ||
|
|
||
| Follow these steps to get the Amica project set up. | ||
|
|
||
| #### Step 1: Clone the Amica Repository | ||
|
|
||
| Open your terminal, navigate to where you want to store the project, and run the following command: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/semperai/amica | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to look at the temp/final git location - for now, should be the current project at: https://github.com/AlphaEcho11/amica |
||
| cd amica | ||
| ``` | ||
|
|
||
| #### Step 2: Install JavaScript Dependencies | ||
|
|
||
| Once you are in the `amica` directory, run this command to install all the necessary frontend packages: | ||
|
|
||
| ```bash | ||
| npm install | ||
| ``` | ||
|
|
||
| #### Step 3: Configure the `text-generation-webui` Path | ||
AlphaEcho11 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Amica needs to know where to find your `text-generation-webui` executable. This is configured in a `settings.json` file. | ||
|
|
||
| ##### How Configuration Works | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Align subheading levels under Step 3 Subheadings should be one level below the Step heading. -##### How Configuration Works
+#### How Configuration Works-##### Creating Your Custom `settings.json`
+#### Creating Your Custom `settings.json`Also applies to: 53-53 🤖 Prompt for AI Agents |
||
|
|
||
| Amica uses a default, bundled configuration file to start. To customize the settings, you must create your own `settings.json` file and place it in the correct application configuration directory for your operating system. | ||
|
|
||
| When Amica starts, it looks for `settings.json` in this order: | ||
| 1. **Your Custom `settings.json`:** It checks for the file in your OS's standard application config directory. | ||
| 2. **Default `settings.json`:** If no custom file is found, it falls back to the default settings bundled inside the application. The default has an empty path, so you **must** create a custom file. | ||
|
|
||
| ##### Creating Your Custom `settings.json` | ||
AlphaEcho11 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 1. First, you need to find your application's configuration directory. The paths are typically: | ||
| * **Windows:** `%APPDATA%\\com.heyamica.dev\\config` (you can paste this into the Explorer address bar) | ||
| * **macOS:** `~/Library/Application Support/com.heyamica.dev` | ||
| * **Linux:** `~/.config/com.heyamica.dev` | ||
|
|
||
| *(Note: The `com.heyamica.dev` directory might not exist until you run Amica at least once.)* | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 2. Create a new file named `settings.json` inside that directory. | ||
|
|
||
| 3. Copy and paste the following content into your new `settings.json` file: | ||
| ```json | ||
| { | ||
| "text_generation_webui_path": "" | ||
| } | ||
| ``` | ||
|
Comment on lines
+66
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Document the configurable proxy port setting The backend now supports a configurable proxy port, but the documentation only shows the path configuration. ```json
{
- "text_generation_webui_path": ""
+ "text_generation_webui_path": "",
+ "proxy_port": 5000
}
```Add a note explaining the proxy_port field: 4. Add the **full path** to your `text-generation-webui` executable inside the quotes.
+ The `proxy_port` field (default: 5000) specifies which port the text-generation-webui API server is listening on.🤖 Prompt for AI Agents |
||
|
|
||
| 4. Add the **full path** to your `text-generation-webui` executable inside the quotes. | ||
|
|
||
| * **Windows Example:** | ||
| ```json | ||
| { | ||
| "text_generation_webui_path": "C:\\Users\\YourUser\\Desktop\\text-generation-webui\\start.bat" | ||
| } | ||
| ``` | ||
|
Comment on lines
+75
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Update examples to include proxy_port The examples should reflect the complete settings structure. ```json
{
- "text_generation_webui_path": "C:\\Users\\YourUser\\Desktop\\text-generation-webui\\start.bat"
+ "text_generation_webui_path": "C:\\Users\\YourUser\\Desktop\\text-generation-webui\\start.bat",
+ "proxy_port": 5000
}
``` ```json
{
- "text_generation_webui_path": "/home/youruser/text-generation-webui/start.sh"
+ "text_generation_webui_path": "/home/youruser/text-generation-webui/start.sh",
+ "proxy_port": 5000
}
```Also applies to: 83-85 🤖 Prompt for AI Agents |
||
| *(Note the double backslashes `\\`)* | ||
|
|
||
| * **Linux/macOS Example:** | ||
| ```json | ||
| { | ||
| "text_generation_webui_path": "/home/youruser/text-generation-webui/start.sh" | ||
| } | ||
| ``` | ||
|
|
||
| If Amica ever has trouble starting, it will show a dialog box explaining the configuration error. This usually means there's a typo in your `settings.json` file or the path to the executable is incorrect. | ||
|
|
||
| ## 3. Building the Application | ||
|
|
||
| Now that everything is configured, you can build the final, standalone executable. | ||
|
|
||
| Run the following command in your terminal. This process will compile the Rust backend and package it with the frontend into a single application. It may take several minutes. | ||
|
|
||
| ```bash | ||
| npm run tauri build | ||
| ``` | ||
|
|
||
| Once the build is complete, you will find the final application inside the `src-tauri/target/release/` directory. It will be a `.exe` file on Windows, a `.AppImage` on Linux, or a `.app` file inside a `.dmg` on macOS. | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## 4. Running Amica | ||
|
|
||
| You can now run this executable file directly! There is no need for any further commands. | ||
|
|
||
| On the first run, be sure to open the in-app settings and configure the following: | ||
| * **Chatbot Backend:** Select **KoboldAI**. | ||
| * **Streaming/Extra Option:** If you see an option for streaming, make sure it is **disabled**. | ||
|
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| That's it! Your self-contained, Rust-powered Amica application is now ready to use. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "text_generation_webui_path": "" | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.