{"id":19730460,"url":"https://github.com/hcd233/aris-ai","last_synced_at":"2025-04-30T01:32:46.129Z","repository":{"id":223518211,"uuid":"748656546","full_name":"hcd233/Aris-AI","owner":"hcd233","description":"An AI project to provide `private` chat and RAG service. 一个提供私有化检索增强生成的AI项目","archived":false,"fork":false,"pushed_at":"2024-07-14T09:59:57.000Z","size":4278,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-14T15:06:03.918Z","etag":null,"topics":["ai","docker","fastapi","generative-ai","langchain","llm","python","rag","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hcd233.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-26T13:31:18.000Z","updated_at":"2024-07-14T10:00:00.000Z","dependencies_parsed_at":"2024-02-25T19:24:22.558Z","dependency_job_id":"3e1ff5f9-8c93-4b69-ac84-01f3cb47ff1b","html_url":"https://github.com/hcd233/Aris-AI","commit_stats":null,"previous_names":["hcd233/alice-ai","hcd233/aris-ai"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcd233%2FAris-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcd233%2FAris-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcd233%2FAris-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hcd233%2FAris-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hcd233","download_url":"https://codeload.github.com/hcd233/Aris-AI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224193001,"owners_count":17271238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","docker","fastapi","generative-ai","langchain","llm","python","rag","streamlit"],"created_at":"2024-11-12T00:16:27.178Z","updated_at":"2024-11-12T00:16:27.623Z","avatar_url":"https://github.com/hcd233.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aris-AI\n\n[ English | [简体中文](README_zh.md) ]\n\n## Introduction\n\nThis is a project that provides **private large language model services**, aiming to quickly access general large models (GPT3.5, GPT4) and private models (Qwen1.5, ChatGLM3, LLama2, Baichuan2, etc.) services, providing a unified API interface. Relying on the langchain framework to provide multi-turn dialogue (Chat) and retrieval augmented generation (RAG) services, the project name comes from the character Aris in Blue Archive, as shown in the figure below\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/hcd233/Aris-AI/master/assets/110531412.jpg\" width=\"50%\"\u003e\n  \u003cbr\u003eAris: Blue Archive 中的角色\n\u003c/p\u003e\n\n---\n\n## Change Log\n\n- [2024-07-13] We open source the [Aris-AI-Model-Server](https://github.com/hcd233/Aris-AI-Model-Server), which integrates LLM, Embedding and Reranker deployment services, and provides an OpenAI Compatible API interface to facilitate users to deploy private models.\n\n- [2024-06-23] We release the [Aris-14B-Chat Series Model](https://huggingface.co/collections/Aris-AI/aris-chat-arcturus-6642fd11069310a4467db222) which sft and dpo by [Qwen1.5-14B-Chat](https://huggingface.co/Qwen/Qwen1.5-14B-Chat) on our private dataset. Please obey the qwen open source agreement while using it.\n\n- [2024-06-15] Use Neo4j as the database for storing knowledge bases\n\n## Tech Stack\n\n### Fine-tuning\n\n- Transformers\n- PEFT\n- Pytorch\n- Deepspeed\n\n### Private Model Deployment\n\n- llama.cpp\n- llama-cpp-python\n\n### Large Language Model Service\n\n- Langchain\n\n### API Backend\n\n- Fastapi\n- Sqlalchemy\n- JWT\n- Mysql\n- Redis\n- Neo4j\n\n### Web UI\n\n- Streamlit\n\n### Project Deployment\n\n- Docker\n\n## Function Implementation\n\n### API Related\n\n1. User registration, login, permission management\n2. Dialogue management, history management\n3. Model (LLM, Embedding) management, preset (System) prompt management\n4. Vector database management, vector database insertion, support:\n\n- Files: Pdf, Markdown, HTML, Jupyter, TXT, Python, C++, Java and other code files\n- Links: Arxiv, Git, unauthenticated url (supports recursive crawling, automated tool crawling)\n\n### Model Service Related\n\n1. Chat: Supports multi-round dialogue\n2. Retriever QA: Supports question answering with (RAG) retrieval enhanced generation\n\n### Web Interface\n\n1. Provide an interface to upload knowledge bases\n2. Provide a dialogue interface\n\n## Project Structure\n\n```text\n.\n├── assets\n├── confs\n│   ├── deployment\n│   └── local\n├── docker\n│   ├── deployment\n│   └── local\n├── envs\n│   ├── deployment\n│   └── local\n├── kubernetes\n├── logs\n├── pages\n└── src\n    ├── api\n    │   ├── auth\n    │   ├── model\n    │   └── router\n    │       └── v1\n    │           ├── model\n    │           └── oauth2\n    ├── config\n    ├── langchain_aris\n    ├── logger\n    ├── middleware\n    │   ├── jwt\n    │   ├── logger\n    │   ├── mysql\n    │   │   └── models\n    │   └── redis\n    └── webui\n```\n\n## Local Deployment\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/hcd233/Aris-AI\ncd Aris-AI\n```\n\n### Create a Virtual Environment (Optional)\n\nYou can skip this step, but you need to make sure that the python environment is 3.11\n\n```bash\nconda create -n aris python=3.11.0\nconda activate aris\n```\n\n### Install Dependencies\n\n```bash\npip install poetry\npoetry install\n```\n\n### Configure conf and env (Omitted)\n\nSee the template file\n\n### Start Mysql and Redis\n\n```bash\ndocker-compose -f docker/local/docker-compose.yml up -d\n```\n\n### Start the API Server\n\nNote that you need to specify local/api.env as the environment variable in the IDE\n\n```bash\npython aris_api.py\n```\n\n### Start the WebUI\n\nNote that you need to specify local/webui.env as the environment variable in the IDE\n\n```bash\nstreamlit run aris_webui.py\n```\n\n### Access SwaggerUI and WebUI\n\n- SwaggerUI: \u003chttp://localhost:${API_PORT}/docs\u003e\n- WebUI: \u003chttp://localhost:8501\u003e\n\n## Docker Deployment\n\n### Configure conf and env (As above)\n\nSee the template file\n\n### Create Volumes\n\n```bash\ndocker volume create mysql-data\ndocker volume create redis-data\ndocker volume create neo4j-data\n```\n\n### Start the Container\n\n```bash\ndocker-compose -f docker/deployment/docker-compose.yml up -d --no-build\n```\n\n### Operation Instructions\n\n#### User Operation\n\n1. For login operations, I only did simple username and password verification, and did not provide a registration function in the WebUI. Please call the API interface yourself, and set the administrator status (is_admin=1) in the database operation to access private models\n2. After login, you need to carry a jwt token to operate the secret key, which is used to call the private model service\n\n#### Model Operation\n\n1. Call the general large model service, which currently only supports the OpenAI series models (or agents with OpenAI-like interfaces). You can access it directly in the API. You need to store information such as base, key, max_tokens in the database, and you can customize the System prompt\n2. Call the private model service, please deploy the model as an API service with an OpenAI-like API (you can use [Aris-AI-Model-Server](https://github.com/hcd233/Aris-AI-Model-Server)), and configure it accordingly.\n\n## Project Outlook\n\n### Goals\n\n1. Support access to more models (AzureOpenAI, Gemini, HuggingFaceEndpoint, Llama.cpp)\n2. More RAG strategies (RAG fusion, rearrangement, multi-path recall, etc.)\n3. Support multi-modal Chat \u0026 RAG\n4. Support maintaining a Key pool for the same model to achieve load balancing\n5. Support Agent and tool calls\n6. Release fine-tuned private models\n\n### Author Status\n\nDue to my busy work schedule, the project progress may be relatively slow, and I will update it occasionally. PRs and Issues are welcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhcd233%2Faris-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhcd233%2Faris-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhcd233%2Faris-ai/lists"}