AI prompts
base on An app that brings language models directly to your phone. # PocketPal AI 📱🚀
PocketPal AI is a pocket-sized AI assistant powered by small language models (SLMs) that run directly on your phone. Designed for both iOS and Android, PocketPal AI lets you interact with various SLMs without the need for an internet connection.
## Table of Contents
- [PocketPal AI 📱🚀](#pocketpal-ai-)
- [Table of Contents](#table-of-contents)
- [Features](#features)
- [Installation](#installation)
- [iOS](#ios)
- [Android](#android)
- [Usage](#usage)
- [Downloading a Model](#downloading-a-model)
- [Loading a Model](#loading-a-model)
- [Advanced Settings](#advanced-settings)
- [Chatting with the model](#chatting-with-the-model)
- [Copying Text](#copying-text)
- [Development Setup](#development-setup)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Scripts](#scripts)
- [Contributing](#contributing)
- [Quick Start for Contributors](#quick-start-for-contributors)
- [Roadmap](#roadmap)
- [License](#license)
- [Contact](#contact)
## 📰 News & Announcements
- **🎨 New Icon Alert (Nov 2024)**: PocketPal AI has a fresh new look! Huge thanks to **[Chun Te Lee](https://github.com/Reeray)** for the design! [Read more](https://github.com/a-ghorbani/pocketpal-ai/discussions/102).
- **🚀 Hugging Face Public Hub Integration (v1.5, Nov 2024)**: PocketPal AI now integrates with the Hugging Face model Hub! Browse, download, and run models directly from the Hugging Face Hub within the app. [Read more](https://github.com/a-ghorbani/pocketpal-ai/discussions/104)
## Features
- **Offline AI Assistance**: Run language models directly on your device without internet connectivity.
- **Model Flexibility**: Download and swap between multiple SLMs, including Danube 2 and 3, Phi, Gemma 2, and Qwen.
- **Auto Offload/Load**: Automatically manage memory by offloading models when the app is in the background.
- **Inference Settings**: Customize model parameters like system prompt, temperature, BOS token, and chat templates.
- **Real-Time Performance Metrics**: View tokens per second and milliseconds per token during AI response generation.
## Installation
### iOS
Download PocketPal AI from the App Store:
[**Download on the App Store**](https://apps.apple.com/us/app/pocketpal-ai/id6502579498)
### Android
Get PocketPal AI on Google Play:
[**Get it on Google Play**](https://play.google.com/store/apps/details?id=com.pocketpalai)
## Usage
For a detailed guide on how to use PocketPal AI, check out the [Getting Started Guide](docs/getting_started.md).
### Downloading a Model
1. Open the app and tap the **Menu** icon (☰).
2. Navigate to the **Models** page.
3. Choose a model from the list and tap **Download**.
### Loading a Model
- After downloading, tap **Load** next to the model to bring it into memory.
### Advanced Settings
- Tap the chevron icon (v) next to a model to access advanced settings like temperature, BOS token, and chat templates.
### Chatting with the model
1. Ensure a model is loaded.
2. Navigate to the **Chat** page from the menu.
3. Start conversing with your AI assistant!
### Copying Text
- **Copy Entire Response**: Tap the copy icon at the bottom of the AI's response bubble.
- **Copy Specific Paragraph**: Long-press on a paragraph to copy its content.
*Note*: Preserving text formatting while copying is currently limited. We're working on improving this feature.
## Development Setup
Interested in contributing or running the app locally? Follow the steps below.
### Prerequisites
- **Node.js** (version 18 or higher)
- **Yarn**
- **React Native CLI**
- **Xcode** (for iOS development)
- **Android Studio** (for Android development)
### Getting Started
1. **Fork and Clone the Repository**
```bash
git clone https://github.com/a-ghorbani/pocketpal-ai
cd pocketpal-ai
```
2. **Install Dependencies**
```bash
yarn install
```
3. **Install Pod Dependencies (iOS Only)**
```bash
cd ios
pod install
cd ..
```
4. **Run the App**
- **iOS Simulator**
```bash
yarn ios
```
- **Android Emulator**
```bash
yarn android
```
### Scripts
- **Start Metro Bundler**
```bash
yarn start
```
- **Clean Build Artifacts**
```bash
yarn clean
```
- **Lint and Type Check**
```bash
yarn lint
yarn typecheck
```
- **Run Tests**
```bash
yarn test
```
## Contributing
We welcome all contributions! Please read our [Contributing Guidelines](CONTRIBUTING.md) and [Code of Conduct](./CODE_OF_CONDUCT.md) before you start.
### Quick Start for Contributors
1. **Fork the Repository**
2. **Create a New Branch**
```bash
git checkout -b feature/your-feature-name
```
3. **Make Your Changes**
4. **Test Your Changes**
- **Run on iOS**
```bash
yarn ios
```
- **Run on Android**
```bash
yarn android
```
5. **Lint and Type Check**
```bash
yarn lint
yarn typecheck
```
6. **Commit Your Changes**
- Follow the Conventional Commits format:
```bash
git commit -m "feat: add new model support"
```
7. **Push and Open a Pull Request**
```bash
git push origin feature/your-feature-name
```
## Roadmap
- **Support for more Android Devices**: Add support for more Android devices (diversity of the Android ecosystem is a challenge so we need more support from the community).
- **Improved Text Copying**: Enhance the ability to copy text while preserving formatting.
- **New Models**: Add support for more tiny LLMs.
- **UI Enhancements**: Improve the overall user interface and user experience.
- **Improve Documentation**: Improve the documentation of the project.
Feel free to open issues to suggest features or report bugs.
## License
This project is licensed under the [MIT License](LICENSE).
## Contact
For questions or feedback, please open an issue.
## Acknowledgements
PocketPal AI is built using the amazing work from:
- **[llama.cpp](https://github.com/ggerganov/llama.cpp)**: Enables efficient inference of LLMs on local devices.
- **[llama.rn](https://github.com/mybigday/llama.rn)**: Implements llama.cpp bindings into React Native.
---
Happy exploring! 🚀📱✨
", Assign "at most 3 tags" to the expected json: {"id":"12308","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"