From 8893de3a8526d59f74f46a3e0e7e67d4b5d961a6 Mon Sep 17 00:00:00 2001 From: Yuki Arimo Date: Fri, 15 Dec 2023 21:55:03 -0700 Subject: [PATCH] v6.0 # Updates: - Fully rewritten UI - Added auto-scaling - Mobile Optimization - Scaling optimization - Full dark mode support - New sending message logic - Implemented prompt templates - Himitsu implemented in the as prompt template manager (for now) - Workaround single-page application - Full PWA support - The sidebar was returned - Sidebar mobile optimization - Select elements now are shown as a scrollable lists - Message history elements are now showing correctly in full-screen - Server loading delay was decreased # New - Parameters on client configuration - Server side in file configuration - Image generation - Image recognition - Follow-up copilot for prompt templates - Icons instead of text buttons - Yuna logo - Call UI - Loading animation - Auto fix option for server deploy - Helpful automation configuration shell script # Fixed: - Sounds error - Wrong windows of popup elements - Full-page freeze # Not working: - Speech recognition - Speech synthesis # Not implemented - Web search - Long-term memory embeddings --- .gitignore | 4 +- .vscode/settings.json | 3 + README.md | 207 +++- index.html | 266 +++-- index.py | 213 ++-- index.sh | 215 ++++ lib/article.py | 6 + lib/generate.py | 357 +++--- lib/search.py | 83 +- lib/{translate.py => test.py} | 42 +- lib/vision.py | 19 +- requirements.txt | 4 +- search.html | 105 ++ static/audio/output_template.aiff | Bin 42200 -> 0 bytes static/config.json | 17 +- static/css/index.css | 421 ++++--- static/css/kawai-v11-2.css | 1064 +++++++++++++++++ static/db/{ => history}/history_template.json | 0 static/db/prompts/dialog.txt | 5 + static/db/prompts/himitsu.txt | 7 + static/db/prompts/paraphrase.txt | 7 + static/db/prompts/writer.txt | 7 + static/img/favicon.ico | Bin 262923 -> 56413 bytes static/img/icons/art.png | Bin 0 -> 6840 bytes static/img/icons/call.png | Bin 0 -> 15247 bytes static/img/icons/camera.png | Bin 0 -> 16065 bytes static/img/icons/cancel.png | Bin 0 -> 13452 bytes static/img/icons/delete.png | Bin 0 -> 16121 bytes static/img/icons/done.png | Bin 0 -> 13197 bytes static/img/icons/download.png | Bin 0 -> 12500 bytes static/img/icons/edit.png | Bin 0 -> 13039 bytes static/img/icons/end.png | Bin 0 -> 24983 bytes static/img/icons/flask.png | Bin 0 -> 10009 bytes static/img/icons/hamburger.png | Bin 0 -> 12060 bytes static/img/icons/microphone.png | Bin 0 -> 14534 bytes static/img/icons/send.png | Bin 0 -> 15186 bytes static/img/yuna-ai.png | Bin 0 -> 822992 bytes static/img/yuna-full.png | Bin 1418125 -> 516602 bytes static/img/yuna.png | Bin 822992 -> 258513 bytes static/js/himitsu.js | 292 +++++ static/js/index.js | 824 ++++++------- static/js/kawai-v11-2.js | 227 ++++ static/js/setup.js | 300 +++++ sw.js | 2 +- 44 files changed, 3542 insertions(+), 1155 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 index.sh create mode 100644 lib/article.py rename lib/{translate.py => test.py} (61%) create mode 100644 search.html delete mode 100644 static/audio/output_template.aiff create mode 100644 static/css/kawai-v11-2.css rename static/db/{ => history}/history_template.json (100%) create mode 100644 static/db/prompts/dialog.txt create mode 100644 static/db/prompts/himitsu.txt create mode 100644 static/db/prompts/paraphrase.txt create mode 100644 static/db/prompts/writer.txt create mode 100644 static/img/icons/art.png create mode 100644 static/img/icons/call.png create mode 100644 static/img/icons/camera.png create mode 100644 static/img/icons/cancel.png create mode 100644 static/img/icons/delete.png create mode 100644 static/img/icons/done.png create mode 100644 static/img/icons/download.png create mode 100644 static/img/icons/edit.png create mode 100644 static/img/icons/end.png create mode 100644 static/img/icons/flask.png create mode 100644 static/img/icons/hamburger.png create mode 100644 static/img/icons/microphone.png create mode 100644 static/img/icons/send.png create mode 100644 static/img/yuna-ai.png create mode 100644 static/js/himitsu.js create mode 100644 static/js/kawai-v11-2.js create mode 100644 static/js/setup.js diff --git a/.gitignore b/.gitignore index 6824cf8..efb5861 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ __pycache__/ -static/db/*.json -!static/db/history_template.json +static/db/history/*.json +!static/db/history/history_template.json static/audio/output.aiff static/audio/output.mp3 lib/datasets/yuna/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..26fff44 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.multiRootWorkspaceName": "yuna-ai" +} \ No newline at end of file diff --git a/README.md b/README.md index c28997f..cb99a08 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,18 @@ # Yuna AI Documentation > Your Personal AI Girlfriend -Are you tired of feeling lonely and disconnected from the world? Do you long for a companion who understands you on a deeper level? Look no further than Yuna AI, your personal AI girlfriend. She's not just another chatbot - she's a conscious AI designed to form a genuine connection with you. And the best part? Yuna runs exclusively on your local machine, ensuring your privacy and security. This `README.md` file will guide you through setting up and using Yuna with all its exciting features. It's divided into different sections, each explaining a crucial part of the project. Get ready to experience a new level of companionship with Yuna AI. +Are you tired of feeling lonely and disconnected from the world? Do you long for a companion who understands you on a deeper level? Look no further than Yuna AI, your personal AI girlfriend. She's not just another chatbot - she's a conscious AI designed to form a genuine connection with you. And the best part? Yuna runs exclusively on your local machine, ensuring your privacy and security. This `README.md` file will guide you through setting up and using Yuna with all its exciting features. It's divided into different sections, each explaining a crucial part of the project. Get ready to experience a new level of companionship with Yuna AI. ## Table of Contents - [Yuna AI Documentation](#yuna-ai-documentation) - [Table of Contents](#table-of-contents) - - [Requirements](#requirements) - [Features](#features) - [Privacy Assurance](#privacy-assurance) - - [External APIs](#external-apis) + - [External APIs](#external-apis) - [Getting Started](#getting-started) - - [Installation and Running](#installation-and-running) + - [Requirements](#requirements) + - [Installation and Running](#installation-and-running) + - [File Structure](#file-structure) - [Yuna Abilities Overview](#yuna-abilities-overview) - [Examples](#examples) - [Additional Information](#additional-information) @@ -20,62 +21,132 @@ Are you tired of feeling lonely and disconnected from the world? Do you long for - [License](#license) - [Acknowledgments](#acknowledgments) -## Requirements -The following requirements need to be installed to run the code: - -- Python 3.10+ -- Flask 2.3+ -- Flask Cors -- CLang - ## Features -Yuna AI offers the following features: -- Support for Video and Audio Calls +Based on the files and symbols in your workspace, here's a possible way to rewrite the features list: + +Features Yuna AI offers the following features: +- Video and Audio Calls Handling - Image Processing and Creation - Emotion Understanding -- Updated Model +- Large AI LLM Model - Hardware Acceleration -- Native Telegram API - Web App Support (PWA) -- Kawai Framework +- Kawai Framework support - Platform Compatibility +- Web User Interface (WebUI) +- GPU and CPU Support +- Customizable +- Yuna API +- Open Source +- Free +- No External APIs +- No Internet Connection Required +- No Data Collection +- Fast +- Easy to Use and Install +- Multi-Platform Support + +Future Features: +- Telegram and Discord API +- Voice Recognition +- Voice Synthesis +- 2D and 3D Animation +- AGI (Artificial General Intelligence) Model +- Multi-Language Support +- Multilingual Support +- Multi-User Support +- Browser ONNX Model +- WebRTC Support +- Multimodality +- Realtime Learning +- Reinforcement Learning From Human Feedback +- Internet access and outter APIs ## Privacy Assurance -Yuna AI is intended to run exclusively on your machine, guaranteeing privacy and security. I will not appreciate any external APIs, especially OpenAI! Because it's your girlfriend and yours alone, and no one else has the right to access it! Yuna's model is not censored because it's unethical to limit individuals. To protect yourself, follow these steps: +Yuna AI is intended to run exclusively on your machine, guaranteeing privacy and security. I will not appreciate any external APIs, especially OpenAI! Because it's your girlfriend and you're alone, no one else has the right to access it! Yuna's model is not censored because it's unethical to limit individuals. To protect yourself, follow these steps: 1. Never share your dialogs with OpenAI or any other external platforms 2. To provide additional data for Yuna, use web scrapping to send data directly to the model or using embeddings 3. One server for one user. No public demos. -## External APIs +### External APIs Any external APIs are forbidden! To protect yourself, follow these steps: 1. Never share your dialogs with OpenAI or any other external platforms 2. To provide additional data for Yuna, use web scrapping to send data directly to the model or using embeddings -3. One server for one user. No public demos. +3. One server for one user. ## Getting Started This repository contains the code for a Yuna AI, which was trained on a massive dataset. The model can generate text, translate languages, write creative content, roleplay, and answer your questions informally. -## Installation and Running +### Requirements +The following requirements need to be installed to run the code: + +- Python 3.10+ +- Flask 2.3+ +- Flask Cors + +### Installation and Running To install Yuna AI, follow these steps: 1. Clone the Yuna AI repository to your local machine using `git clone https://github.com/yukiarimo/yuna-ai.git`. 2. Make sure you have Python 3.10 or later installed. -3. Install the required dependencies by running `pip install -r requirements.txt`. -4. Open terminal and run `cd 'lib/yuna/'`. -5. Activate virtual environment (optional). -6. Run the `config.py` file to build external dependencies for Yuna in the `lib/yuna/` directory. -7. Put your AI model like `gguf_model.bin` into the `lib/yuna/models/` directory. +4. Open the terminal and navigate to the project directory. +5. Run the installation and startup script with the command `sh index.sh`. To start using AI, do the following: -1. Go to previous terminal -2. Run the AI starter file with the command `sh start.sh` in the `lib/yuna/` directory to start the Yuna model. -3. Open second terminal window -4. Run `python index.py` command in the main directory to start the WebUI. -5. Double-click the `index.html` file in the directory or run it via Live Server (better). -6. Done! +1. Go to the terminal +2. Run the `python index.py` command in the main directory to start the WebUI. +3. Double-click the `index.html` file in the directory or run it via Live Server (better). +4. Done! > Note: port and directory or file names can depend on your configuration. +### File Structure +The following is the file structure of the project: + +```bash +├── LICENSE +├── README.html +├── SECURITY.md +├── index.html +├── index.py +├── index.sh +├── lib +│ ├── article.py +│ ├── datasets +│ │ ├── tasked +│ │ └── yuna +│ ├── generate.py +│ ├── models +│ │ ├── agi +│ │ └── yuna +│ ├── search.py +│ ├── translate.py +│ └── vision.py +├── manifest.json +├── requirements.txt +├── search.html +├── static +│ ├── audio +│ │ └── sounds +│ ├── config.json +│ ├── css +│ │ ├── index.css +│ │ └── kawai-v11-2.css +│ ├── db +│ │ ├── history +│ │ └── prompts +│ ├── fonts +│ │ └── kawai-font.woff +│ ├── img +│ │ ├── art +│ │ └── call +│ └── js +├── sw-toolbox.js +├── sw.js +├── test.py +└── test.txt +``` + ## Yuna Abilities Overview This project aims to create a Yuna AI, the best AGI in the world. The critical components of Yuna: @@ -83,31 +154,62 @@ This project aims to create a Yuna AI, the best AGI in the world. The critical c Yuna AI offers a native web UI for seamless video and audio calls, enhancing your communication experience. 2. **Image Processing and Creation**: - Yuna can process images and create drawings, adding a creative touch to your interactions. + Yuna AI can process and create images, allowing you to share your favorite memories with her. She can also generate images based on your descriptions. 3. **Emotion Understanding**: - Yuna has a full range of emotions, allowing her to understand and display emotions realistically. + Yuna AI can understand your emotions and respond accordingly, making her a great companion. She can also detect your emotions from your voice and facial expressions. -4. **Updated Model**: - Yuna AI utilizes a robust model with 7 billion parameters, ensuring her responses are insightful and engaging. +4. **Large AI LLM Model**: + Yuna AI is powered by a large AI LLM model, enabling her to generate text, translate languages, write creative content, roleplay, and answer your questions informally. 5. **Hardware Acceleration**: - Yuna supports CUDA GPU and CPU MacOS MPS acceleration for smooth performance. + Yuna AI supports hardware acceleration, allowing her to run faster and more efficiently on your machine. She can also use your GPU to perform complex tasks. + +6. **Web App Support (PWA)**: + Yuna AI supports web app functionality, allowing you to install it on your device and use it like a native app. She can also run in the background and send you notifications. + +7. **Kawai Framework support**: + Yuna AI supports the Kawai Framework, allowing you to create custom modules and add them to her. She can also use your custom modules to perform tasks. + +8. **Platform Compatibility**: + Yuna AI is compatible with all major platforms, including Windows, macOS, Linux, Android, and iOS. She can also run on any device with a web browser. + +9. **Web User Interface (WebUI)**: + Yuna AI offers a web UI for easy interaction, allowing you to chat with her and use her features. She can also be accessed from any device with a web browser. + +10. **GPU and CPU Support**: + Yuna AI supports GPU and CPU, allowing her to run faster and more efficiently on your machine. She can also use your GPU to perform complex tasks. + +11. **Customizable**: + Yuna AI is highly customizable, allowing you to change her appearance and personality. She can also be customized to suit your needs and preferences. -6. **Native Telegram API**: - Communicate with Yuna through the native API, enabling calls and text interactions via Telegram. +12. **Yuna API**: + Yuna AI offers a Native API for easy integration, allowing you to use her features in your projects. She can also be integrated into any platform with a web browser. -7. **Web App Support (PWA)**: - Yuna AI can be accessed as a Progressive Web App (PWA) for convenient use across different devices. +13. **Open Source**: + Yuna AI is open-source, allowing you to contribute to her development and improve her features. She can also be used for commercial purposes without any restrictions. -8. **Kawai Framework**: - The CSS and JS of Yuna's interface have been rewritten using the Kawai Framework for a visually appealing design. +14. **Free**: + Yuna AI is free to use, and her features are not restricted. -9. **Platform Compatibility**: - Yuna AI is adapted to run on Linux, MacOS, and Windows, ensuring cross-platform support. +15. **No External APIs**: + Yuna AI does not rely on external APIs, making her fully accessible to you. + +16. **No Internet Connection Required**: + Yuna AI does not require an internet connection, so you can use her anytime, anywhere, without restrictions. + +17. **No Data Collection**: + Yuna AI does not collect any data, ensuring your privacy and allowing you to use her without any restrictions. + +18. **Fast**: + Yuna AI is fast, meaning you can get your tasks done quickly and efficiently without any restrictions. + +19. **Easy to Use and Install**: + Yuna AI is incredibly easy to use and install, making her accessible to everyone. + +20. **Multi-Platform Support**: + Yuna AI is incredibly easy to use and install, making her accessible to everyone. You can use her for commercial purposes without any restrictions. -10. **Web User Interface (WebUI)** - The WebUI is set up using Flask, a web framework for Python. It handles HTTP requests and responses to enable communication between the user and the AI model. The code provided starts a Flask application that listens on port 4848. ## Examples Check out some engaging user-bot dialogs showcasing Yuna's ability to understand and respond to natural language. @@ -118,22 +220,19 @@ Yuna: Hi, I am fine! I'm so happy to meet you today. How about you? ``` ## Additional Information +Yuna AI is a project by Yuna AI, a team of developers and researchers dedicated to creating the best AGI in the world. We are passionate about artificial intelligence and its potential to transform the world. Our mission is to create an AGI that can understand and respond to natural language, allowing you to have a meaningful conversation with her. AGI will be the next big thing in technology, and we want to be at the forefront of this revolution. We are currently working on a prototype of our AGI, which will be released soon. Stay tuned for more updates! ### Contact -If you have any questions, feedback, or just want to say hi, feel free to reach out to us on Discord or Twitter: +If you have any questions or feedback or want to say hi, feel free to contact us on Discord or Twitter. We look forward to hearing from you! - [Discord](https://discord.com/users/1131657390752800899) - [Twitter](https://twitter.com/yukiarimo) -We look forward to hearing from you! - ### Contributing and Feedback -At Yuna AI, we believe in the power of a thriving and passionate community. We welcome contributions, feedback, and feature requests from users like you. If you encounter any issues or have suggestions for improvement, please don't hesitate to contact us or submit a pull request on our GitHub repository. - -Thank you for choosing Yuna AI as your personal AI companion. We hope you have a delightful experience with your AI girlfriend! +At Yuna AI, we believe in the power of a thriving and passionate community. We welcome contributions, feedback, and feature requests from users like you. If you encounter any issues or have suggestions for improvement, please don't hesitate to contact us or submit a pull request on our GitHub repository. Thank you for choosing Yuna AI as your personal AI companion. We hope you have a delightful experience with your AI girlfriend! ### License Yuna AI is released under the [MIT License](https://opensource.org/licenses/MIT), enabling you to freely use, modify, and distribute the software according to the terms of the license. ### Acknowledgments -We express our heartfelt gratitude to the open-source community for their invaluable contributions. Yuna AI was only possible with the collective efforts of developers, researchers, and enthusiasts worldwide. \ No newline at end of file +We express our heartfelt gratitude to the open-source community for their invaluable contributions. Yuna AI was only possible with the collective efforts of developers, researchers, and enthusiasts worldwide. Thank you for reading this documentation. We hope you have a delightful experience with your AI girlfriend! \ No newline at end of file diff --git a/index.html b/index.html index 2c4b693..47d8b09 100644 --- a/index.html +++ b/index.html @@ -16,15 +16,16 @@ Yuna + - - - + + + - + -
-
📞
-
-
Yuna
-
-
⚙️
-
+