base on Simple frontend for LLMs built in react-native. # ChatterUI - A simple app for LLMs ChatterUI is a native mobile frontend for LLMs. Run LLMs on device or connect to various commercial or open source APIs. ChatterUI aims to provide a mobile-friendly interface with fine-grained control over chat structuring. If you like the app, feel free support me here: <a href='https://ko-fi.com/W7W7X8T7W' target='_blank'><img height='42' style='border:0px;height:42px;' src='https://storage.ko-fi.com/cdn/kofi6.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a> <div> Chat With Characters or Assistants <br/> <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/characterlist.png" width="150" > <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/chat.png" width="150" > <br/> Use on-device Models or APIs <br/> <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/models.png" width="150" > <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/api.png" width="150" > <br/> Modify And Customize <br/> <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/charactereditor.png" width="150" > <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/settings.png" width="150" > <br/> Personalize Yourself <br/> <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/usereditor.png" width="150" > <img src ="https://github.com/Vali-98/ChatterUI/blob/master/assets/screenshots/userlist.png" width="150" > </div> ## Features: - Run LLMs on-device in Local Mode - Connect to various APIs in Remote Mode - Chat with characters. (Supports the Character Card v2 specification.) - Create and manage multiple chats per character. - Customize Sampler fields and Instruct formatting - Integrates with your device’s text-to-speech (TTS) engine <br/> # Usage Download and install latest APK from the [releases](https://github.com/Vali-98/ChatterUI/releases/latest) page. <i>iOS is Currently unavailable due to lacking iOS hardware for development</i> ## Local Mode ChatterUI uses a [llama.cpp](https://github.com/ggerganov/llama.cpp) under the hood to run gguf files on device. A custom adapter is used to integrate with react-native: [cui-llama.rn](https://github.com/Vali-98/cui-llama.rn) To use on-device inferencing, first enable Local Mode, then go to Models > Import Model / Use External Model and choose a gguf model that can fit on your device's memory. The importing functions are as follows: - Import Model: Copies the model file into ChatterUI, potentially speeding up startup time. - Use External Model: Uses a model from your device storage directly, removing the need to copy large files into ChatterUI but with a slight delay in load times. After that, you can load the model and begin chatting! _Note: For devices with Snapdragon 8 Gen 1 and above or Exynos 2200+, it is recommended to use the Q4_0 quantization for optimized performance._ ## Remote Mode Remote Mode allows you to connect to a few common APIs from both commercial and open source projects. ### Open Source Backends: - koboldcpp - text-generation-webui - Ollama ### Dedicated API: - OpenAI - Claude _(with ability to use a proxy)_ - Cohere - Open Router - Mancer - AI Horde ### Generic backends: - Generic Text Completions - Generic Chat Completions _These should be compliant with any Text Completion/Chat Completion backends such as Groq or Infermatic._ ### Custom APIs: Is your API provider missing? ChatterUI allows you to define APIs using its template system. Read more about it [here!](https://github.com/Vali-98/ChatterUI/discussions/126) ## Development ### Android To run a development build, follow these simple steps: - Install any Java 17/21 SDK of your choosing - Install `android-sdk` via `Android Studio` - Clone the repo: ``` git clone https://github.com/Vali-98/ChatterUI.git ``` - Install dependencies via npm and run via Expo: ``` npm install npx expo run:android ``` #### Building an APK Requires Node.js, Java 17/21 SDK and Android SDK. Expo uses EAS to build apps which requires a Linux environment. 1. Clone the repo. 2. Rename the `eas.json.example` to `eas.json`. 3. Modify `"ANDROID_SDK_ROOT"` to the directory of your Android SDK 4. Run the following: ``` npm install eas build --platform android --local ``` ### IOS Currently in development ## Acknowledgement - [llama.cpp](https://github.com/ggerganov/llama.cpp) - the underlying engine to run LLMs - [llama.rn](https://github.com/mybigday/llama.rn) - the original react-native llama.cpp adapter ", Assign "at most 3 tags" to the expected json: {"id":"12598","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"