{"id":26515428,"url":"https://github.com/bean980310/ai-companion","last_synced_at":"2026-05-14T21:36:29.376Z","repository":{"id":272370628,"uuid":"916371853","full_name":"bean980310/ai-companion","owner":"bean980310","description":"AI companions including generative AI such as chatbots, image generation, text generation, and audio generation.","archived":false,"fork":false,"pushed_at":"2026-04-15T00:40:54.000Z","size":68335,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-15T02:28:34.464Z","etag":null,"topics":["ai","ai-translate","chatbot","generative-ai","image-generation","llm","local-ai","nlp","stable-diffusion","storytelling-generators","text-generation","text-to-image"],"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/bean980310.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-01-14T00:51:22.000Z","updated_at":"2026-04-15T00:40:57.000Z","dependencies_parsed_at":"2025-01-14T01:35:36.751Z","dependency_job_id":"74ffb217-077e-4778-bb76-11f92f5f3f7c","html_url":"https://github.com/bean980310/ai-companion","commit_stats":null,"previous_names":["bean980310/ai-companion"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bean980310/ai-companion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bean980310%2Fai-companion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bean980310%2Fai-companion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bean980310%2Fai-companion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bean980310%2Fai-companion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bean980310","download_url":"https://codeload.github.com/bean980310/ai-companion/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bean980310%2Fai-companion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33044320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","ai-translate","chatbot","generative-ai","image-generation","llm","local-ai","nlp","stable-diffusion","storytelling-generators","text-generation","text-to-image"],"created_at":"2025-03-21T06:15:46.546Z","updated_at":"2026-05-14T21:36:29.369Z","avatar_url":"https://github.com/bean980310.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Companion for Local Machines\n\n![AI Companion](assets/images/ai-companion-2.png)\n\nA Gradio-based AI companion app leveraging generative AI models (LLMs, Diffusion models, etc.) running in a local environment.\n\n[English](README.md) [한국어](README_ko.md) [日本語](README_ja.md) [简体中文](README_zh_cn.md) [繁體中文](README_zh_tw.md)\n\n## Overview\n\nThe AI Companion offers chatbot services along with AI-powered generation of images, videos, and audio content. Utilizing user personas and character personas, the app introduces persona-based chatbot interactions, transforming AI beyond mere tools into genuine friends and partners. Users can engage in conversations, collaborative tasks, and recreational activities with AI characters.\n\nWhile the user persona mainly targets general users, the image, video, music, and audio generation services also cater to professional users.\n\n## Side Project\n\n[LLM Backend](https://github.com/bean980310/ai-companion-llm-backend.git)\n[Image Backend](https://github.com/bean980310/ai-companion-image-backend.git)\n[Langchain Integrator](https://github.com/bean980310/ai-companion-langchain-integrator.git)\n\n## Main Features\n\n### Chatbot\n\nInteract with AI using Large Language Models (LLMs).\n\n**Supported Models**  \n\n* **API**  \n\n|Provider|Model Name|\n|-------|----|\n|OpenAI|gpt-3.5-turbo \u003cbr\u003e gpt-4 \u003cbr\u003e gpt-4-turbo \u003cbr\u003e gpt-4o-mini \u003cbr\u003e gpt-4o \u003cbr\u003e gpt-4.1 \u003cbr\u003e gpt-4.1-mini \u003cbr\u003e gpt-4.1-nano |\n|Anthropic|claude-3-haiku-20240307 \u003cbr\u003e claude-3-sonnet-20240229 \u003cbr\u003e claude-3-opus-latest \u003cbr\u003e claude-3-5-sonnet-latest \u003cbr\u003e claude-3-5-haiku-latest \u003cbr\u003e claude-3-7-sonnet-latest|\n|Google GenAI|gemini-1.5-flash \u003cbr\u003e gemini-1.5-flash-8b \u003cbr\u003e gemini-1.5-pro \u003cbr\u003e gemini-2.0-flash|\n\n* **Local**: Transformers, GGUF, MLX (Apple Silicon Macs only)  \nPre-downloaded Transformer models are available via the Download Center.  \n\n|Provider|Model Name|\n|--------|-----|\n|meta-llama|meta-llama/Llama-3.1-8B \u003cbr\u003e meta-llama/Llama-3.1-8B-Instruct \u003cbr\u003e meta-llama/Llama-3.2-11B-Vision \u003cbr\u003e meta-llama/Llama-3.2-11B-Vision-Instruct|\n|google|google/gemma-2-9b \u003cbr\u003e google/gemma-2-9b-it \u003cbr\u003e google/gemma-3-12b-pt \u003cbr\u003e google/gemma-3-12b-it|\n|Qwen|Qwen/Qwen2.5-7B \u003cbr\u003e Qwen/Qwen2.5-7B-Instruct \u003cbr\u003e Qwen/Qwen2.5-14B \u003cbr\u003e Qwen/Qwen2.5-14B-Instruct|\n|mistralai|mistralai/Mistral-7B-v0.3 \u003cbr\u003e mistralai/Mistral-7B-Instruct-v0.3 \u003cbr\u003e mistralai/Mistral-Small-24B-Base-2501 \u003cbr\u003e mistralai/Mistral-Small-24B-Instruct-2501|\n\n**Character Persona Settings**  \n\n* **System Prompt(System Message)**: Instructions that define the chatbot’s role or behavior based on user needs. (Default: You are an useful AI assistant.) Presets or characters automatically apply predefined prompts.\n* **Character**: Choose your AI conversation partner.\n* **Preset**: Applies user-defined system prompts. Presets automatically update when switching characters.\n\n**Hyperparameter Settings**  \nIf you aren’t familiar with hyperparameters, it’s recommended to stick to the default values.\n\n* **Seed**: Initial random number seed used in generation (default: 42).\n* **Temperature**: Controls creativity/randomness of responses. Higher values yield more creative answers; lower values result in deterministic responses (default: 0.6).\n* **Top K**: Limits the number of word options, choosing from the most probable words for high-quality outputs (default: 20).\n* **Top P**: Adjusts randomness by setting a probability threshold, sampling from top tokens until the threshold is reached (default: 0.9).\n* **Repetition Penalty**: Controls repetition of words; higher values reduce repetition (default: 1.1).\n\n### Image Generation\n\nCreate images using models like Stable Diffusion and Flux. Images are generated via ComfyUI backend.\n\n**Supported Models**  \n\n* **API**\nCurrently, API image generation models have limited support.\n\n|Developer|Model repo id|\n|-------|----|\n|OpenAI|dall-e-3|\n|Google GenAI|imagen-3.0-generate-002|\n\n* **Local**: Diffusers, Checkpoints\n  * **Diffusers**: Currently, Diffusers models can be scanned and selected but cannot yet generate images (feature coming soon).\n  * **Checkpoints**: Image generation via ComfyUI. Model files should be placed in models/checkpoints within the ComfyUI directory.\n\nSupported Local Base Models:\n\n* Stable Diffusion 1.5\n* Stable Diffusion 2.x\n* Stable Diffusion XL 1.0\n* Stable Diffusion 3 Medium\n* FLUX.1 Schnell\n* FLUX.1 Dev\n* Stable Diffusion 3.5 Large\n* Stable Diffusion 3.5 Medium\n* Illustrious XL 1.0\n\n**Detailed options**  \n\n* **LoRA**: Supports up to 10 LoRA models per base model. Compatible LoRAs must be applied.\n* **VAE**: User-defined VAE. Defaults to embedded VAE within the Checkpoints.\n* **Embedding**: Use via syntax like embedding:name.\n* **ControlNet**: Interface not yet implemented; coming soon.\n* **Refiner**: For Stable Diffusion XL 1.0, select the start step for refiner sampling.\n\n**Generation Options**  \n\n* **Positive Prompt**: Generate images based on the input text.\n* **Negative Prompt**: Exclude unwanted features from generated images.\n* **Width, Height**: Adjust image dimensions.\n* **Recommended Resolutions**\n\n|Base Model|Recommended Resolution|\n|----------|----------|\n|Stable Diffusion 1.5 \u003cbr\u003e Stable Diffusion 2.x|512x512 \u003cbr\u003e 512x768 \u003cbr\u003e 768x512|\n|Stable Diffusion XL 1.0 \u003cbr\u003e Stable Diffusion 3 Medium \u003cbr\u003e FLUX.1 Schnell \u003cbr\u003e FLUX.1 Dev \u003cbr\u003e Stable Diffusion 3.5 Large \u003cbr\u003e Stable Diffusion 3.5 Medium|1024x1024 \u003cbr\u003e 896x1152 \u003cbr\u003e 1152x896 \u003cbr\u003e 832x1216 \u003cbr\u003e 1216x832 \u003cbr\u003e 768x1344 \u003cbr\u003e 1344x768 \u003cbr\u003e 640x1536 \u003cbr\u003e 1536x640|\n|Illustrious XL 1.0|1536x1536 \u003cbr\u003e 1248x1824 \u003cbr\u003e 1824x1248|\n\n* **Generation Steps**: Higher values result in longer generation times but potentially better quality.\n* **Denoise Strength**: Adjusts the level of noise.\n\n**Advanced Settings**  \n\n* **Sampler**: Different samplers yield varying outputs.\n* **Scheduler**: Affects output even with the same sampler/prompt.\n* **CFG Scale**: Higher CFG values closely follow prompts; lower values are more creative.\n* **Seed**: Initial random number seed.\n* **Clip Skip**: Skips certain steps during image creation.\n* **Batch Size**: Number of images generated per run.\n\n**Image to Image**  \nModify existing images or use Inpaint for selective alterations.\n\n### Storyteller\n\nUtilizes LLMs optimized for text creation, especially for storytelling. (Currently under development.)\n\n**Supported Models**  \nSame as Chatbot.\n\n**Hyperparameters**  \nSame as Chatbot.  \nIf you are not familiar with how hyperparameters work, we recommend leaving them at the default values.\n\n### Video Generation\n\nComing Soon\n\n### Audio Generation\n\nComing Soon\n\n### Translator\n\nMulti-language translation using translation models. Supports text extraction from uploaded images or PDF files for translation.\n\n## Installation\n\n**Clone a repository**  \n\n```shell\n# Clone a repository only\ngit clone https://github.com/bean980310/ai-companion.git\n# Clone a repository with submodules\ngit clone --recursive https://github.com/bean980310/ai-companion.git\n# Init and Update a submodules\ngit submodule init\ngit submodule update\n```\n\n* **Virtual Environment Setup**\n\n```shell\n# conda (Recommended!)\n# Python 3.10\nconda create -n ai-companion python=3.10\n# Python 3.11\nconda create -n ai-companion python=3.11\n# Python 3.12\nconda create -n ai-companion python=3.12\nconda activate ai-companion\n# Other virtual environments\ncd ai-companion\n# venv\npython3 -m venv venv\n# uv\nuv venv --python 3.10 \nuv venv --python 3.11\nuv venv --python 3.12\n# MacOS/Linux/Windows WSL2\nsource venv/bin/activate # venv\nsource .venv/bin/activate # uv\n# Windows\n.\\venv\\Scripts\\activate.bat # venv\n.\\.venv\\Scripts\\activate.bat # uv\n```\n\n**Install dependencies**  \n\n* **Windows**\n\n```shell\n# on Windows\n.\\installer_windows_amd64.bat\n```\n\n```pwsh\n# on Windows (Powershell)\n.\\installer_windows_amd64.ps1\n```\n\n```bash\n# on Windows Subsystem for Linux 2\nbash installer_windows_amd64_wsl2.sh\n# or\n./installer_windows_amd64_wsl2.sh\n```\n\n* **macOS(Apple Silicon Mac)**\n\n```zsh\nzsh installer_macos_arm64.sh\n# or\n./installer_macos_arm64.sh\n```\n\n* **Linux**\n\n```bash\nbash installer_linux_amd64_cuda.sh\n# or\n./installer_linux_amd64_cuda.sh\n```\n\n* **MeloTTS(Optional)**\n\n```shell\npip install git+https://github.com/myshell-ai/MeloTTS.git --no-deps\n```\n\n### Installing xformers on Mac\n\n```zsh\nbrew update\nbrew install gcc cmake llvm libomp\n```\n\n```zsh\n# Case 1\nexport PATH=\"/opt/homebrew/opt/llvm/bin:$PATH\"\n\nexport LDFLAGS=\"-L/opt/homebrew/opt/libomp/lib\"\nexport CPPFLAGS=\"-I/opt/homebrew/opt/libomp/include\"\nexport CXXFLAGS=\"-Xpreprocessor -fopenmp\"\n\nexport CC=/opt/homebrew/opt/llvm/bin/clang\nexport CXX=/opt/homebrew/opt/llvm/bin/clang++\nexport LDFLAGS=\"-L/opt/homebrew/opt/llvm/lib\"\nexport CPPFLAGS=\"-I/opt/homebrew/opt/llvm/include\"\npip install --upgrade xformers\n\n# Case 2\nPATH=\"/opt/homebrew/opt/llvm/bin:$PATH\" LDFLAGS=\"-L/opt/homebrew/opt/libomp/lib\" CPPFLAGS=\"-I/opt/homebrew/opt/libomp/include\" CXXFLAGS=\"-Xpreprocessor -fopenmp\" CC=/opt/homebrew/opt/llvm/bin/clang CXX=/opt/homebrew/opt/llvm/bin/clang++ LDFLAGS=\"-L/opt/homebrew/opt/llvm/lib\" CPPFLAGS=\"-I/opt/homebrew/opt/llvm/include\" pip install --upgrade xformers\n```\n\n## Run\n\n```zsh\npython app.py\n```\n\n### Support for Intel Macs\n\nAI Companion for Local Machines no longer supports Intel CPU-based Macs.  \nIf you are using an Intel CPU-based Macs, we recommend that you consider migrating to an Apple Silicon Based Macs or a Windows PC or Linux machine with an Nvidia GPU environment. If you have difficulty migrating from an Intel CPU-based Macs, you can use a companion application that supports Intel CPU-based Macs instead.\n\n### Guidance for Windows Systems with GPUs That Do Not Support CUDA 12.4 or Higher\n\nAI Companion for Local Machines provides support for dependency installation to ensure compatibility between PyTorch and xformers.  \nOn Windows, versions of CUDA lower than 12.4 cannot install the latest xformers. Therefore, for CUDA 11.8 and 12.1 environments, the PyTorch version is fixed at **2.4.0** to ensure compatibility with the latest supported xformers version, **xformers 0.0.27.post2**.  \nPlease note that future support for Windows systems with CUDA versions below 12.4 will be discontinued.  \nIf you are using Windows and have a CUDA version below 12.4, we recommend upgrading to CUDA 12.4 or higher and reinstalling PyTorch and xformers accordingly. If your GPU does not support CUDA 12.4 or higher, we recommend upgrading to a compatible GPU or considering migration to a newer PC.  \n\n### Support for Windows\n\nAI Companion for Local Machines is optimized for UNIX/Linux kernel-based operating systems. While it can be used on Windows, GPU acceleration is unavailable when running directly on Windows. To properly use AI Companion for Local Machines on Windows, we recommend using it within a WSL2 environment.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbean980310%2Fai-companion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbean980310%2Fai-companion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbean980310%2Fai-companion/lists"}