diff --git a/README.md b/README.md
index cad0b79..4fb7417 100644
--- a/README.md
+++ b/README.md
@@ -2,18 +2,28 @@
A modern and easy-to-use client for Ollama. Have the greatest experience while keeping everything private and in your local network.
-|  |  |  |  |
+|  |  |  |  |
|-|-|-|-|
-> Important: This app does not host a Ollama server on device, but rather connects to one and uses its api endpoint.
-> Don't know what Ollama is? Learn more at [ollama.com](https://ollama.com/).
+> [!IMPORTANT]
+> This app does not host a Ollama server on device, but rather connects to one and uses its api endpoint.
+> You don't know what Ollama is? Learn more at [ollama.com](https://ollama.com/).
- [Ollama App](#ollama-app)
- [Installation](#installation)
- [Initial Setup](#initial-setup)
- - [Side Menu](#side-menu)
+ - [Chat View](#chat-view)
+ - [Multimodal Input](#multimodal-input)
- [Model Selector](#model-selector)
- - [Multimodal Model Input](#multimodal-model-input)
+ - [Side Menu](#side-menu)
+ - [Settings](#settings)
+ - [Host](#host)
+ - [Custom headers](#custom-headers)
+ - [Behavior](#behavior)
+ - [Interface](#interface)
+ - [Voice](#voice)
+ - [Export](#export)
+ - [About (and Updates)](#about-and-updates)
- [Multilingual Interface](#multilingual-interface)
- [Custom Builds](#custom-builds)
- [Actually Building](#actually-building)
@@ -30,71 +40,193 @@ Alternatively, you can also download the app from any of the following stores:
After installing the app and opening it for the first time, you'll encounter this popup:
-
+
Go through the welcome dialog one by one, you should read their content, but you don't have to.
-|  |  |  |
+|  |  |  |
|-|-|-|
After going through that, you'll get a small snack bar notifying you that you have to set the host. For that, open the sidebar (swipe from the left to right or click the icon in the top left corner) and click on settings. There you'll find all app-related settings, you should go through them, but for the initial setup, only the first one is important.
-In the bit host text field, you have to enter the base URL of your instance. The port is required, except for the port number matching the protocol (443 for HTTPS or 80 for HTTP). After that, click the save icon right next to the text field.
+In the big host text field, you have to enter the base URL of your instance. The port is required unless the port number matches the protocol (443 for HTTPS or 80 for HTTP). After that, click the save icon right next to the text field.
-This address will be checked, so no worry about entering the wrong one. The disadvantage of this is that your server has to be running even if you don't want to chat with it at that moment. If you set the host once, and your server is offline, the requests will fail, but the host will stay saved if you don't change it yourself. Don't worry, just go into the side menu and click the settings button to change it.
+To learn more about the host setting, visit [Settings](#host)
+
+> [!IMPORTANT]
+> The Ollama server needs additional steps to be asccessible from without the local machine. To learn more, visit issue #5
That's it, you can now just chat. Enter a message into the box at the bottom and click the send icon.
-## Side Menu
+## Chat View
-The button on the top left opens the menu. In it, you have two options: `New Chat` and `Settings`. The first option creates a new chat, and the second one opens the settings screen where you can change how everything works.
+This is the main view of the app, simple and, most importantly, working.
-Below that are all the chats. To delete one, swipe it from left to right. To rename the chat tab and hold it until a popup dialog appears. In it, you can change the title or tab the sparkle icon to let AI find one for you. This is not affected by the "generate title" setting.
+> [!NOTE]
+> To start chatting, you first have to select a model in the [Model Selector](#model-selector). Do that first, then come back here.
-| |  |
-|-|-|
+The chat mode is straightforward. Just write a message, wait a few moments, and the answer will get sent into the chat.
-> Note: The button on the top right corner deletes the chat. It has the same effect as swiping the chat in the sidebar.
+The chat view hides a few useful features already included by default. Messages can be deleted by double-tapping the message you desire to wipe from the earth, and all messages sent since then, including the message itself, will get deleted.
+
+Editing a message is almost as simple. After enabling message editing in [Interface Settings](#interface), simply long press on a message and a popup will open and ask for the new content.
+
+
+
+> [!TIP]
+> Messages (almost) fully support markdown syntax. That means the AI will be able to recieve and send back the message in markdown.
+
+### Multimodal Input
+
+Ollama App supports multimodal models, models that support input via an image. Models supporting the technology are marked with an image icon next to their name in the [Model Selector](#model-selector).
+
+After selecting a multimodal model, a new icon appears at the bottom left of the message bar; a camera icon. Clicking on it reveals the following bottom sheet:
+
+|  |  |  |
+|-|-|-|
+
+Select one of them, take or select your photo and it'll get added to the chat. Adding multiple images is allowed, just repeat the steps.
+
+Even though the images will appear in the chat already after sending, they won't be submitted to the AI until a new text message is sent. When you send a message the AI will answer the message in consideration of the image.
## Model Selector
-You can access the model selector by tapping on the `` text in the top middle or the name of the currently selected model in the same spot. Then you'll get the following bottom sheet:
+You can access the model selector by tapping on the `` text in the top middle or the name of the currently selected model in the same spot. Then you'll get the following popup dialog:
-
+
-This will display all the models currently installed in your Ollama server instance.
-
-Models with an image-like icon next to them allow multimodal input. The one shown in the image, `llava`, supports exactly that.
+This will display all the models currently installed on your Ollama server instance.
The models with a star next to them are recommended models. They have been selected by me (hehe) to be listed as that. Read more under [Custom Builds](#custom-builds).
The `Add` button does nothing at the moment, it just opens a snack bar listing steps on how to add a model to an instance. For safety reasons, I didn't add the ability to add a model directly via name in the app.
-## Multimodal Model Input
+Models supporting [Multimodal Input](#multimodal-input) are marked with an image icon next to their name, like `llava` in the image above.
-Ollama App supports multimodal models, models with support input via an image.
+## Side Menu
-After selecting a supported model, as describes in [Model Selector](#model-selector), a new icon appears at the bottom left of the message bar; a camera icon. Clicking on it reveals the following bottom sheet:
+The button on the top left opens the menu. In it, you have two options: `New Chat` and `Settings`. The first option creates a new chat, and the second one opens the [Settings](#settings) where you can change how everything works.
-|  |  |
-|-|-|
+Below that are all the chats. To delete one, swipe it from left to right. To rename the chat tab and hold it until a popup dialog appears. In it, you can change the title or tab the sparkle icon to let AI find one for you. This is not affected by the "generate title" setting.
-Select one of them, take or select your photo and it'll get added to the chat. You can also add multiple.
+| |  |  |
+|-|-|-|
-Even though the images will appear in the chat already after sending, they won't be submitted to the AI until a new text message is sent.
+> [!NOTE]
+> The button on the top right corner deletes the chat. It has the same effect as swiping the chat in the sidebar.
+
+## Settings
+
+Ollama App offers a lot of configuration options. We'll go through every option one by one.
+
+### Host
+
+The host is the main address of your Ollama server. It may include a port, a protocol and a hostname. Paths are not recommended.
+
+|  |  |  |
+|-|-|-|
+
+The port is required unless the port number matches the protocol (443 for HTTPS or 80 for HTTP). After that, click the save icon right next to the text field to set the host.
+
+The host address will be checked, so no worry about entering the wrong one. If you set the host once, and your server is offline, the requests will fail, but the host will stay saved if you don't change it yourself. To do that, just go into the side menu and open settings to do so.
+
+#### Custom headers
+
+
+
+Ollama App supports adding custom headers. This can be useful in case you want to secure your instance with authentification or something similar. Simply press the plus icon next to the host input and set one as a JSON object. This could be for example:
+
+```json
+{
+ "Authorization": "Bearer "
+}
+```
+
+### Behavior
+
+
+
+The behavior settings include settings connected to the system prompt. They won't be applied until you create a new chat.
+
+The system prompt is sent to the assistant at the start of the conversation. It leads the assistant in a direction and it'll talk like you told him to in this message. To reset the system prompt to default, empty its value, click the save icon and close the screen.
+
+The option to disable markdown is not safe and the assistant can still potentially add markdown to its response.
+
+### Interface
+
+
+
+The interface settings are focused, as the name might imply, on the interface of the Ollama App. The following list will document all options
+
+1. Targeted at the [Model Selector](#model-selector).
+ 1. Show model tags in the model selector. This can be useful if you have multiple versions of the same model installed
+ 2. Clear the chat if the model is changed. This is highly recommended, disabling this option could lead to unintended behavior
+2. Used in the [Chat View](#chat-view)
+ 1. Set the request mode. Streaming is recommended, but sometimes it's not available, then select "Request"
+ 2. Whether to generate titles of chats with the Ollama AI or not. Could higher potential quota costs
+ 3. Whether long-pressing messages opens the edit dialog or not
+ 4. Whether to ask before deletion of chats. Useful if important data is potentially stored in chats or not
+ 5. Whether to show tips in the main sidebar
+3. Backend loading options
+ 1. Keep model always loaded (`keep_alive` to `-1`)
+ 2. Never keep model (`keep_alive` to `0`)
+ 3. Time to keep models alive
+4. Appearance settings
+ 1. Whether to enable haptic feedback or not
+ 2. Whether to start windows maximized (only desktop)
+ 3. Theme of app
+ 4. Follow the device theme/color
+
+### Voice
+
+> [!WARNING]
+> This is still an experimental feature! Some functions may not work as intended!
+
+|  |  |  |
+|-|-|-|
+
+Tap the "Permissions not granted" button to allow the needed permissions. They're needed to allow Speach To Text to function.
+
+After that, enable Voice Mode by switching the toggle. To bring it to work, you now have to press "No language selected" and select a language in the language dialog. That's it.
+
+Then, press the button on the spot where the attachment icon would be with a multimodal model or press the photo icon and the "Voice" button.
+
+
+
+> [!NOTE]
+> Documentation will be properly added once this feature leaves experimental phase
+
+### Export
+
+
+
+The export function allows you to export and save all chats to a file. This can be very useful if you want to back up your data or want to sync it between devices.
+
+> [!WARNING]
+> The import functionallity deletes all currently saved chats from disk and replaces them with the ones from the file. This cannot be undone.
+
+### About (and Updates)
+
+
+
+The About screen holds a lot of useful information.
+
+You can access the GitHub repository or the issue page of the app directly from this screen.
+
+One more useful thing is the update checker. It looks for updates in the repo and will prompt you to download them directly from GitHub. Be careful though, the used GitHub API has a rate limit. You can only send a few requests before the rate limit kicks in.
## Multilingual Interface
-I integrated support for multiple languages into the Ollama App. Currently available are:
+Ollama App does support multiple languages. Currently available are:
-- English
-- German
+- [x] English (fallback)
+- [x] German
-Your language isn't one of them? Reach out to me and I'll give you access to my Crowdin project.
+In case the language you're looking for isn't listed, you can check if the development is in progress on the [Crowdin project page](https://crowdin.com/project/ollama-app). If not, you can always contribute.
## Custom Builds
-Now comes the interesting part. I built this app in a way you can easily create custom builds. Currently, there are these values that can be customized:
+Now it's going to get interesting. The app is built in a way so you can easily create custom builds. Currently, there are these values that can be customized:
```
// use host or not, if false dialog is shown
@@ -127,8 +259,4 @@ But how do you create a custom build?
First, follow [the Flutter installation guide](https://docs.flutter.dev/get-started/install) by selecting Android as the first app type. Then follow [these steps](https://docs.flutter.dev/deployment/android#signing-the-app) till you have your custom `key.properties`. Place it into the `android` folder at the root of the project.
-If you're running on Windows, just double-click on `scripts/build.bat` and wait till the process is done. Don't worry, there'll be a lot of Kotlin errors in the terminal. You can safely ignore them, the build will be fine.
-
-If you're not running Windows, open the file `scripts/build.bat` in a text editor and copy the command starting with `flutter` after the `call` command in a terminal window. Again, don't worry about the Kotlin errors.
-
-In both cases, you'll now find your APK in `build/app/outputs/apk/release/app-release.apk` (don't blame me for that, it's a flutter thing).
\ No newline at end of file
+Make sure dart is available as a command or added as the default program for `.dart`. Then execute `scripts/build.dart` and wait for it to finish processing. Then go to `build/.output`. There you'll find everything you need, the normal Android app and the experimental Windows build.
diff --git a/assets/screenshots/flutter_01.png b/assets/screenshots/flutter_01.png
new file mode 100644
index 0000000..f331343
Binary files /dev/null and b/assets/screenshots/flutter_01.png differ
diff --git a/assets/screenshots/flutter_02.png b/assets/screenshots/flutter_02.png
new file mode 100644
index 0000000..0289c5f
Binary files /dev/null and b/assets/screenshots/flutter_02.png differ
diff --git a/assets/screenshots/flutter_03.png b/assets/screenshots/flutter_03.png
new file mode 100644
index 0000000..b636950
Binary files /dev/null and b/assets/screenshots/flutter_03.png differ
diff --git a/assets/screenshots/flutter_04.png b/assets/screenshots/flutter_04.png
new file mode 100644
index 0000000..d6111a0
Binary files /dev/null and b/assets/screenshots/flutter_04.png differ
diff --git a/assets/screenshots/flutter_05.png b/assets/screenshots/flutter_05.png
new file mode 100644
index 0000000..340b7bd
Binary files /dev/null and b/assets/screenshots/flutter_05.png differ
diff --git a/assets/screenshots/flutter_06.png b/assets/screenshots/flutter_06.png
new file mode 100644
index 0000000..fa98834
Binary files /dev/null and b/assets/screenshots/flutter_06.png differ
diff --git a/assets/screenshots/flutter_07.png b/assets/screenshots/flutter_07.png
new file mode 100644
index 0000000..6630c8c
Binary files /dev/null and b/assets/screenshots/flutter_07.png differ
diff --git a/assets/screenshots/flutter_08.png b/assets/screenshots/flutter_08.png
new file mode 100644
index 0000000..4fd2dc6
Binary files /dev/null and b/assets/screenshots/flutter_08.png differ
diff --git a/assets/screenshots/flutter_09.png b/assets/screenshots/flutter_09.png
new file mode 100644
index 0000000..2e3500b
Binary files /dev/null and b/assets/screenshots/flutter_09.png differ
diff --git a/assets/screenshots/flutter_10.png b/assets/screenshots/flutter_10.png
new file mode 100644
index 0000000..f834556
Binary files /dev/null and b/assets/screenshots/flutter_10.png differ
diff --git a/assets/screenshots/flutter_11.png b/assets/screenshots/flutter_11.png
new file mode 100644
index 0000000..6d586d7
Binary files /dev/null and b/assets/screenshots/flutter_11.png differ
diff --git a/assets/screenshots/flutter_12.png b/assets/screenshots/flutter_12.png
new file mode 100644
index 0000000..055df16
Binary files /dev/null and b/assets/screenshots/flutter_12.png differ
diff --git a/assets/screenshots/flutter_13.png b/assets/screenshots/flutter_13.png
new file mode 100644
index 0000000..a5a4055
Binary files /dev/null and b/assets/screenshots/flutter_13.png differ
diff --git a/assets/screenshots/flutter_14.png b/assets/screenshots/flutter_14.png
new file mode 100644
index 0000000..b630a63
Binary files /dev/null and b/assets/screenshots/flutter_14.png differ
diff --git a/assets/screenshots/flutter_15.png b/assets/screenshots/flutter_15.png
new file mode 100644
index 0000000..3d63de2
Binary files /dev/null and b/assets/screenshots/flutter_15.png differ
diff --git a/assets/screenshots/flutter_16.png b/assets/screenshots/flutter_16.png
new file mode 100644
index 0000000..e406816
Binary files /dev/null and b/assets/screenshots/flutter_16.png differ
diff --git a/assets/screenshots/flutter_17.png b/assets/screenshots/flutter_17.png
new file mode 100644
index 0000000..f6f6457
Binary files /dev/null and b/assets/screenshots/flutter_17.png differ
diff --git a/assets/screenshots/flutter_18.png b/assets/screenshots/flutter_18.png
new file mode 100644
index 0000000..ff38723
Binary files /dev/null and b/assets/screenshots/flutter_18.png differ
diff --git a/assets/screenshots/flutter_19.png b/assets/screenshots/flutter_19.png
new file mode 100644
index 0000000..b5df8d1
Binary files /dev/null and b/assets/screenshots/flutter_19.png differ
diff --git a/assets/screenshots/flutter_20.png b/assets/screenshots/flutter_20.png
new file mode 100644
index 0000000..a4b7c56
Binary files /dev/null and b/assets/screenshots/flutter_20.png differ
diff --git a/assets/screenshots/flutter_21.png b/assets/screenshots/flutter_21.png
new file mode 100644
index 0000000..a2eefb8
Binary files /dev/null and b/assets/screenshots/flutter_21.png differ
diff --git a/assets/screenshots/flutter_22.png b/assets/screenshots/flutter_22.png
new file mode 100644
index 0000000..52033a0
Binary files /dev/null and b/assets/screenshots/flutter_22.png differ
diff --git a/assets/screenshots/flutter_23.png b/assets/screenshots/flutter_23.png
new file mode 100644
index 0000000..40cc487
Binary files /dev/null and b/assets/screenshots/flutter_23.png differ
diff --git a/assets/screenshots/flutter_24.png b/assets/screenshots/flutter_24.png
new file mode 100644
index 0000000..5fc589a
Binary files /dev/null and b/assets/screenshots/flutter_24.png differ
diff --git a/assets/screenshots/flutter_25.png b/assets/screenshots/flutter_25.png
new file mode 100644
index 0000000..cdb1369
Binary files /dev/null and b/assets/screenshots/flutter_25.png differ
diff --git a/assets/screenshots/flutter_26.png b/assets/screenshots/flutter_26.png
new file mode 100644
index 0000000..500dd00
Binary files /dev/null and b/assets/screenshots/flutter_26.png differ
diff --git a/assets/screenshots/flutter_27.png b/assets/screenshots/flutter_27.png
new file mode 100644
index 0000000..5a27637
Binary files /dev/null and b/assets/screenshots/flutter_27.png differ
diff --git a/assets/screenshots/flutter_28.png b/assets/screenshots/flutter_28.png
new file mode 100644
index 0000000..84fee01
Binary files /dev/null and b/assets/screenshots/flutter_28.png differ
diff --git a/assets/screenshots/flutter_29.png b/assets/screenshots/flutter_29.png
new file mode 100644
index 0000000..84fee01
Binary files /dev/null and b/assets/screenshots/flutter_29.png differ
diff --git a/assets/screenshots/flutter_30.png b/assets/screenshots/flutter_30.png
new file mode 100644
index 0000000..39ffe09
Binary files /dev/null and b/assets/screenshots/flutter_30.png differ
diff --git a/assets/screenshots/flutter_31.png b/assets/screenshots/flutter_31.png
new file mode 100644
index 0000000..31a2791
Binary files /dev/null and b/assets/screenshots/flutter_31.png differ
diff --git a/assets/screenshots/flutter_32.png b/assets/screenshots/flutter_32.png
new file mode 100644
index 0000000..ad410ed
Binary files /dev/null and b/assets/screenshots/flutter_32.png differ
diff --git a/assets/screenshots/flutter_33.png b/assets/screenshots/flutter_33.png
new file mode 100644
index 0000000..36071d8
Binary files /dev/null and b/assets/screenshots/flutter_33.png differ
diff --git a/assets/screenshots/img1.png b/assets/screenshots/img1.png
deleted file mode 100644
index 6a836a6..0000000
Binary files a/assets/screenshots/img1.png and /dev/null differ
diff --git a/assets/screenshots/img1_framed.png b/assets/screenshots/img1_framed.png
deleted file mode 100644
index eb1d872..0000000
Binary files a/assets/screenshots/img1_framed.png and /dev/null differ
diff --git a/assets/screenshots/img2.png b/assets/screenshots/img2.png
deleted file mode 100644
index feaba12..0000000
Binary files a/assets/screenshots/img2.png and /dev/null differ
diff --git a/assets/screenshots/img2_framed.png b/assets/screenshots/img2_framed.png
deleted file mode 100644
index f6ebbc9..0000000
Binary files a/assets/screenshots/img2_framed.png and /dev/null differ
diff --git a/assets/screenshots/img3.png b/assets/screenshots/img3.png
deleted file mode 100644
index 205e3e9..0000000
Binary files a/assets/screenshots/img3.png and /dev/null differ
diff --git a/assets/screenshots/img3_framed.png b/assets/screenshots/img3_framed.png
deleted file mode 100644
index fe299fd..0000000
Binary files a/assets/screenshots/img3_framed.png and /dev/null differ
diff --git a/assets/screenshots/img4.png b/assets/screenshots/img4.png
deleted file mode 100644
index 04997d4..0000000
Binary files a/assets/screenshots/img4.png and /dev/null differ
diff --git a/assets/screenshots/img4_framed.png b/assets/screenshots/img4_framed.png
deleted file mode 100644
index 623ee84..0000000
Binary files a/assets/screenshots/img4_framed.png and /dev/null differ
diff --git a/assets/screenshots/img5.png b/assets/screenshots/img5.png
deleted file mode 100644
index f0cfaee..0000000
Binary files a/assets/screenshots/img5.png and /dev/null differ
diff --git a/assets/screenshots/img5_framed.png b/assets/screenshots/img5_framed.png
deleted file mode 100644
index 3f5d520..0000000
Binary files a/assets/screenshots/img5_framed.png and /dev/null differ
diff --git a/assets/screenshots/img6.png b/assets/screenshots/img6.png
deleted file mode 100644
index a8002ba..0000000
Binary files a/assets/screenshots/img6.png and /dev/null differ
diff --git a/assets/screenshots/img6_framed.png b/assets/screenshots/img6_framed.png
deleted file mode 100644
index 64b9f2e..0000000
Binary files a/assets/screenshots/img6_framed.png and /dev/null differ
diff --git a/assets/screenshots/other/s01.png b/assets/screenshots/other/s01.png
deleted file mode 100644
index f297c95..0000000
Binary files a/assets/screenshots/other/s01.png and /dev/null differ
diff --git a/assets/screenshots/other/s02.png b/assets/screenshots/other/s02.png
deleted file mode 100644
index 0923cb6..0000000
Binary files a/assets/screenshots/other/s02.png and /dev/null differ
diff --git a/assets/screenshots/other/s03.png b/assets/screenshots/other/s03.png
deleted file mode 100644
index 749544d..0000000
Binary files a/assets/screenshots/other/s03.png and /dev/null differ
diff --git a/assets/screenshots/other/s04.png b/assets/screenshots/other/s04.png
deleted file mode 100644
index 5b053b4..0000000
Binary files a/assets/screenshots/other/s04.png and /dev/null differ
diff --git a/assets/screenshots/other/s05.png b/assets/screenshots/other/s05.png
deleted file mode 100644
index 4c91c72..0000000
Binary files a/assets/screenshots/other/s05.png and /dev/null differ
diff --git a/assets/screenshots/other/s06.png b/assets/screenshots/other/s06.png
deleted file mode 100644
index 73dcbc2..0000000
Binary files a/assets/screenshots/other/s06.png and /dev/null differ
diff --git a/assets/screenshots/other/s07.png b/assets/screenshots/other/s07.png
deleted file mode 100644
index 58527bf..0000000
Binary files a/assets/screenshots/other/s07.png and /dev/null differ
diff --git a/assets/screenshots/other/s08.png b/assets/screenshots/other/s08.png
deleted file mode 100644
index 189e389..0000000
Binary files a/assets/screenshots/other/s08.png and /dev/null differ
diff --git a/assets/screenshots/other/s09.png b/assets/screenshots/other/s09.png
deleted file mode 100644
index abff117..0000000
Binary files a/assets/screenshots/other/s09.png and /dev/null differ
diff --git a/scripts/build.bat b/scripts/build.bat
deleted file mode 100644
index 9fc4904..0000000
--- a/scripts/build.bat
+++ /dev/null
@@ -1,11 +0,0 @@
-@echo OFF
-cd /D "%~dp0"
-cd ..
-cls
-
-call flutter build apk --obfuscate --split-debug-info=build\debugAndroid
-
-echo.
-echo ----------
-pause
-exit
diff --git a/scripts/build_beta.dart b/scripts/build.dart
similarity index 100%
rename from scripts/build_beta.dart
rename to scripts/build.dart