/frapuse-ai-companion-android-app

This repository represents my final assignment of "Module 3 - Android App Development" at Syntax Institut.

Primary LanguageKotlinGNU Affero General Public License v3.0AGPL-3.0

frapuse - AI Companion Android App

This is frapuse (short for frappante muse) an android app project that I created as my final assignment for the Module 3 - Android App Development course at Syntax Institut.

Features

  • The app is a mobile user interface for the text-generation-webui, where you can chat with a localy hosted llm.

  • The app is a minimal user interface for the stable-diffusion-webui. You can either use it through the keyword generate followed with the desired prompt for image generation or use it directly from a dedicated fragment.

  • The app allows the upload of PDFs which are localy stored with elasticsearch and accessed through an haystack pipeline. In order to activate the extension you need to activate the checkbox.

  • The app uses Kotlin as the programming language and follows the MVVM architecture pattern.

Installation

  1. Prerequisites

  2. To run the app, you need to have Android Studio installed on your computer.

  3. Clone this repository and open it in Android Studio.

  4. Place the links for each api inside the according file.

  5. Run App on your Android Phone.

Limitations / Caveats / Known Issues

  • IMPORTANT: In order for this App to work you need to follow this issue from oobabooga/text-generation-webui and install/enable the old API Extension.
  • IMPORTANT: To clear the chat history you have to long press the send button in chat next to the prompt text field.
  • Sometimes, when the phone is under heavy load, some of the first tokens are omitted.
  • The prompt template is adjusted to vicuna (most of the testing was performed with wizard-vicuna and its varying models), changing the template is a tidious task and also has to be done directly from inside the code. Note that other models still can be used but wont perform at their best. (Fix on next Update)
  • Currently it is only possible to stream the response (Note: You still need to adjust the blocking api address to make the app work!).
  • The prompt examples for image generation within the chat must be adjusted inside of the code.
  • It is not possible to save generated images larger than the size of 768x768. If the width OR height is adjusted beyond this value, the other must be adjusted accordingly.
  • The code is not optimized and at parts it can be a bit messy. Please excuse this, I am still learning and improoving my code style and habbits.

App Previews

Screenshots:

Home Screen

Home Screen

Chat Screen Base

Chat Screen Base

Chat Screen Image Gen

Chat Screen Image Gen

PDF Upload Screen

PDF Upload Screen

Chat Settings Extensions Screen

Chat Settings Extensions Screen

Chat Settings Instructions Screen

Chat Settings Instructions Screen

Chat Settings Parameters Screen

Chat Settings Parameters Screen

Chat Screen Document Search

Chat Screen Document Search

Document View Screen

Document View Screen

Image Generation Screen

Image Generation Screen

Image Library Small Screen

Image Library Small Screen

Image Library Big Screen

Image Library Big Screen

Video:

YouTube Link

Special thanks to Syntax Institute and the devs of the in this project used dependecies!

Feel free to provide feedback and ask questions. I'm happy to help and willing to improve my work! :)