[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-sigoden--aichat":3,"tool-sigoden--aichat":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":76,"owner_company":76,"owner_location":76,"owner_email":78,"owner_twitter":76,"owner_website":76,"owner_url":79,"languages":80,"stars":101,"forks":102,"last_commit_at":103,"license":104,"difficulty_score":23,"env_os":105,"env_gpu":106,"env_ram":106,"env_deps":107,"category_tags":112,"github_topics":113,"view_count":23,"oss_zip_url":76,"oss_zip_packed_at":76,"status":16,"created_at":128,"updated_at":129,"faqs":130,"releases":164},3256,"sigoden\u002Faichat","aichat","All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI Tools & Agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more.","aichat 是一款功能全面的命令行大语言模型工具，旨在让用户在终端内直接高效地与各类 AI 模型交互。它解决了开发者在不同模型平台间频繁切换、难以将自然语言指令转化为系统操作以及缺乏上下文连续对话体验的痛点。\n\n这款工具特别适合习惯使用终端的开发者、运维工程师及技术研究人员。通过 aichat，用户可以无缝接入 OpenAI、Claude、Gemini、Ollama 等超过 20 种主流模型提供商，无需为不同平台配置多个客户端。其核心亮点包括智能 Shell 助手，能将自然语言描述自动转换为精准的系统命令并支持直接执行；强大的 RAG（检索增强生成）能力，支持直接读取本地文件、目录甚至远程 URL 作为上下文；以及灵活的角色定制与会话管理功能，确保多轮对话的逻辑连贯性。此外，aichat 提供交互式 REPL 模式，支持自动补全和历史搜索，让复杂的 AI 工作流在命令行中变得简单流畅。无论是快速查询代码、分析日志还是自动化日常任务，aichat 都能成为你终端里得力的智能伙伴。","# AIChat: All-in-one LLM CLI Tool\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Factions\u002Fworkflows\u002Fci.yaml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Factions\u002Fworkflows\u002Fci.yaml)\n[![Crates](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Faichat.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Faichat)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1226737085453701222?label=Discord)](https:\u002F\u002Fdiscord.gg\u002Fmr3ZZUB9hG)\n\nAIChat is an all-in-one LLM CLI tool featuring Shell Assistant, CMD & REPL Mode, RAG, AI Tools & Agents, and More. \n\n## Install\n\n### Package Managers\n\n- **Rust Developers:** `cargo install aichat`\n- **Homebrew\u002FLinuxbrew Users:** `brew install aichat`\n- **Pacman Users**: `pacman -S aichat`\n- **Windows Scoop Users:** `scoop install aichat`\n- **Android Termux Users:** `pkg install aichat`\n\n### Pre-built Binaries\n\nDownload pre-built binaries for macOS, Linux, and Windows from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Freleases), extract them, and add the `aichat` binary to your `$PATH`.\n\n## Features\n\n### Multi-Providers\n\nIntegrate seamlessly with over 20 leading LLM providers through a unified interface. Supported providers include OpenAI, Claude, Gemini (Google AI Studio), Ollama, Groq, Azure-OpenAI, VertexAI, Bedrock, Github Models, Mistral, Deepseek, AI21, XAI Grok, Cohere, Perplexity, Cloudflare, OpenRouter, Ernie, Qianwen, Moonshot, ZhipuAI, MiniMax, Deepinfra, VoyageAI, any OpenAI-Compatible API provider.\n\n### CMD Mode\n\nExplore powerful command-line functionalities with AIChat's CMD mode.\n\n![aichat-cmd](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_477ddb75825e.png)\n\n### REPL Mode\n\nExperience an interactive Chat-REPL with features like tab autocompletion, multi-line input support, history search, configurable keybindings, and custom REPL prompts.\n\n![aichat-repl](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_bc81cf3a677f.png)\n\n### Shell Assistant\n\nElevate your command-line efficiency. Describe your tasks in natural language, and let AIChat transform them into precise shell commands. AIChat intelligently adjusts to your OS and shell environment.\n\n![aichat-execute](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_aac7e20f20b2.png)\n\n### Multi-Form Input\n\nAccept diverse input forms such as stdin, local files and directories, and remote URLs, allowing flexibility in data handling.\n\n| Input             | CMD                                  | REPL                             |\n| ----------------- | ------------------------------------ | -------------------------------- |\n| CMD               | `aichat hello`                       |                                  |\n| STDIN             | `cat data.txt \\| aichat`             |                                  |\n| Last Reply        |                                      | `.file %%`                       |\n| Local files       | `aichat -f image.png -f data.txt`    | `.file image.png data.txt`       |\n| Local directories | `aichat -f dir\u002F`                     | `.file dir\u002F`                     |\n| Remote URLs       | `aichat -f https:\u002F\u002Fexample.com`      | `.file https:\u002F\u002Fexample.com`      |\n| External commands | ```aichat -f '`git diff`'```         | ```.file `git diff` ```          |\n| Combine Inputs    | `aichat -f dir\u002F -f data.txt explain` | `.file dir\u002F data.txt -- explain` |\n\n### Role\n\nCustomize roles to tailor LLM behavior, enhancing interaction efficiency and boosting productivity.\n\n![aichat-role](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_b2f89dd9ad6c.png)\n\n> The role consists of a prompt and model configuration.\n\n### Session\n\nMaintain context-aware conversations through sessions, ensuring continuity in interactions.\n\n![aichat-session](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_a52059f262ef.png)\n\n> The left side uses a session, while the right side does not use a session.\n\n### Macro\n\nStreamline repetitive tasks by combining a series of REPL commands into a custom macro.\n\n![aichat-macro](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_979ebd961c3f.png)\n\n### RAG\n\nIntegrate external documents into your LLM conversations for more accurate and contextually relevant responses.\n\n![aichat-rag](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_f9dce189f4e5.png)\n\n### Function Calling\n\nFunction calling supercharges LLMs by connecting them to external tools and data sources. This unlocks a world of possibilities, enabling LLMs to go beyond their core capabilities and tackle a wider range of tasks.\n\nWe have created a new repository [https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions) to help you make the most of this feature.\n\n#### AI Tools & MCP\n\nIntegrate external tools to automate tasks, retrieve information, and perform actions directly within your workflow.\n\n![aichat-tool](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_95f360929042.png)\n\n#### AI Agents (CLI version of OpenAI GPTs)\n\nAI Agent = Instructions (Prompt) + Tools (Function Callings) + Documents (RAG).\n\n![aichat-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_608b37caf677.png)\n\n### Local Server Capabilities\n\nAIChat includes a lightweight built-in HTTP server for easy deployment.\n\n```\n$ aichat --serve\nChat Completions API: http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Fchat\u002Fcompletions\nEmbeddings API:       http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Fembeddings\nRerank API:           http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Frerank\nLLM Playground:       http:\u002F\u002F127.0.0.1:8000\u002Fplayground\nLLM Arena:            http:\u002F\u002F127.0.0.1:8000\u002Farena?num=2\n```\n\n#### Proxy LLM APIs\n\nThe LLM Arena is a web-based platform where you can compare different LLMs side-by-side. \n\nTest with curl:\n\n```sh\ncurl -X POST -H \"Content-Type: application\u002Fjson\" -d '{\n  \"model\":\"claude:claude-3-5-sonnet-20240620\",\n  \"messages\":[{\"role\":\"user\",\"content\":\"hello\"}], \n  \"stream\":true\n}' http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Fchat\u002Fcompletions\n```\n\n#### LLM Playground\n\nA web application to interact with supported LLMs directly from your browser.\n\n![aichat-llm-playground](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_fe34fcf7ee3d.png)\n\n#### LLM Arena\n\nA web platform to compare different LLMs side-by-side.\n\n![aichat-llm-arena](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_a70b3b9b71f0.png)\n\n## Custom Themes\n\nAIChat supports custom dark and light themes, which highlight response text and code blocks.\n\n![aichat-themes](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_004b91e85bb0.png)\n\n## Documentation\n\n- [Chat-REPL Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FChat-REPL-Guide)\n- [Command-Line Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FCommand-Line-Guide)\n- [Role Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FRole-Guide)\n- [Macro Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FMacro-Guide)\n- [RAG Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FRAG-Guide)\n- [Environment Variables](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FEnvironment-Variables)\n- [Configuration Guide](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FConfiguration-Guide)\n- [Custom Theme](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FCustom-Theme)\n- [Custom REPL Prompt](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FCustom-REPL-Prompt)\n- [FAQ](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FFAQ)\n\n## License\n\nCopyright (c) 2023-2025 aichat-developers.\n\nAIChat is made available under the terms of either the MIT License or the Apache License 2.0, at your option.\n\nSee the LICENSE-APACHE and LICENSE-MIT files for license details.","# AIChat：一体化LLM命令行工具\n\n[![CI](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Factions\u002Fworkflows\u002Fci.yaml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Factions\u002Fworkflows\u002Fci.yaml)\n[![Crates](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Faichat.svg)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Faichat)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1226737085453701222?label=Discord)](https:\u002F\u002Fdiscord.gg\u002Fmr3ZZUB9hG)\n\nAIChat是一款一体化LLM命令行工具，具备Shell助手、CMD与REPL模式、RAG、AI工具与智能体等功能。\n\n## 安装\n\n### 包管理器\n\n- **Rust开发者:** `cargo install aichat`\n- **Homebrew\u002FLinuxbrew用户:** `brew install aichat`\n- **Pacman用户**: `pacman -S aichat`\n- **Windows Scoop用户:** `scoop install aichat`\n- **Android Termux用户:** `pkg install aichat`\n\n### 预编译二进制文件\n\n从[GitHub Releases](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Freleases)下载适用于macOS、Linux和Windows的预编译二进制文件，解压后将`aichat`二进制文件添加到你的`$PATH`中即可。\n\n## 功能特性\n\n### 多模型支持\n\n通过统一接口无缝集成超过20家领先的LLM提供商。支持的提供商包括OpenAI、Claude、Gemini（Google AI Studio）、Ollama、Groq、Azure-OpenAI、VertexAI、Bedrock、Github Models、Mistral、Deepseek、AI21、XAI Grok、Cohere、Perplexity、Cloudflare、OpenRouter、Ernie、Qianwen、Moonshot、ZhipuAI、MiniMax、Deepinfra、VoyageAI以及任何兼容OpenAI API的提供商。\n\n### CMD模式\n\n使用AIChat的CMD模式探索强大的命令行功能。\n\n![aichat-cmd](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_477ddb75825e.png)\n\n### REPL模式\n\n体验交互式Chat-REPL，支持Tab自动补全、多行输入、历史搜索、可配置快捷键以及自定义REPL提示符。\n\n![aichat-repl](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_bc81cf3a677f.png)\n\n### Shell助手\n\n提升你的命令行效率。用自然语言描述你的任务，让AIChat将其转化为精确的Shell命令。AIChat会智能适配你的操作系统和Shell环境。\n\n![aichat-execute](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_aac7e20f20b2.png)\n\n### 多种输入形式\n\n支持多种输入形式，如标准输入、本地文件和目录，以及远程URL，从而提供灵活的数据处理方式。\n\n| 输入             | CMD                                  | REPL                             |\n| ----------------- | ------------------------------------ | -------------------------------- |\n| CMD               | `aichat hello`                       |                                  |\n| STDIN             | `cat data.txt \\| aichat`             |                                  |\n| 上次回复        |                                      | `.file %%`                       |\n| 地方文件       | `aichat -f image.png -f data.txt`    | `.file image.png data.txt`       |\n| 本地目录       | `aichat -f dir\u002F`                     | `.file dir\u002F`                     |\n| 远程URL         | `aichat -f https:\u002F\u002Fexample.com`      | `.file https:\u002F\u002Fexample.com`      |\n| 外部命令        | ```aichat -f '`git diff`'```         | ```.file `git diff` ```          |\n| 组合输入        | `aichat -f dir\u002F -f data.txt explain` | `.file dir\u002F data.txt -- explain` |\n\n### 角色\n\n自定义角色以调整LLM的行为，提高交互效率并增强生产力。\n\n![aichat-role](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_b2f89dd9ad6c.png)\n\n> 角色由提示词和模型配置组成。\n\n### 会话\n\n通过会话保持上下文感知的对话，确保交互的连贯性。\n\n![aichat-session](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_a52059f262ef.png)\n\n> 左侧使用了会话，而右侧未使用会话。\n\n### 宏\n\n将一系列REPL命令组合成自定义宏，简化重复性任务。\n\n![aichat-macro](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_979ebd961c3f.png)\n\n### RAG\n\n将外部文档整合到LLM对话中，以获得更准确且更具上下文相关性的响应。\n\n![aichat-rag](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_f9dce189f4e5.png)\n\n### 函数调用\n\n函数调用通过将LLM连接到外部工具和数据源，极大地增强了LLM的能力。这开启了无限可能，使LLM能够超越其核心能力，完成更广泛的任务。\n\n我们创建了一个新的仓库[https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions)，帮助你充分利用这一功能。\n\n#### AI工具与MCP\n\n集成外部工具，以自动化任务、检索信息并在工作流中直接执行操作。\n\n![aichat-tool](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_95f360929042.png)\n\n#### AI代理（OpenAI GPTs的CLI版本）\n\nAI代理 = 指令（提示词）+ 工具（函数调用）+ 文档（RAG）。\n\n![aichat-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_608b37caf677.png)\n\n### 本地服务器功能\n\nAIChat内置了一个轻量级HTTP服务器，便于部署。\n\n```\n$ aichat --serve\n聊天完成API: http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Fchat\u002Fcompletions\n嵌入API:       http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Fembeddings\n重排序API:     http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Frerank\nLLM游乐场:     http:\u002F\u002F127.0.0.1:8000\u002Fplayground\nLLM竞技场:     http:\u002F\u002F127.0.0.1:8000\u002Farena?num=2\n```\n\n#### 代理LLM API\n\nLLM竞技场是一个基于网页的平台，你可以在上面并排比较不同的LLM。\n\n使用curl测试：\n\n```sh\ncurl -X POST -H \"Content-Type: application\u002Fjson\" -d '{\n  \"model\":\"claude:claude-3-5-sonnet-20240620\",\n  \"messages\":[{\"role\":\"user\",\"content\":\"hello\"}], \n  \"stream\":true\n}' http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Fchat\u002Fcompletions\n```\n\n#### LLM游乐场\n\n一个可以直接在浏览器中与支持的LLM交互的Web应用。\n\n![aichat-llm-playground](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_fe34fcf7ee3d.png)\n\n#### LLM竞技场\n\n一个用于并排比较不同LLM的Web平台。\n\n![aichat-llm-arena](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_a70b3b9b71f0.png)\n\n## 自定义主题\n\nAIChat支持自定义的深色和浅色主题，可以高亮显示响应文本和代码块。\n\n![aichat-themes](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_readme_004b91e85bb0.png)\n\n## 文档\n\n- [Chat-REPL 指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FChat-REPL-Guide)\n- [命令行指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FCommand-Line-Guide)\n- [角色指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FRole-Guide)\n- [宏指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FMacro-Guide)\n- [RAG 指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FRAG-Guide)\n- [环境变量](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FEnvironment-Variables)\n- [配置指南](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FConfiguration-Guide)\n- [自定义主题](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FCustom-Theme)\n- [自定义 REPL 提示符](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FCustom-REPL-Prompt)\n- [常见问题解答](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fwiki\u002FFAQ)\n\n## 许可证\n\n版权所有 © 2023–2025 aichat 开发者。\n\nAIChat 根据您的选择，以 MIT 许可证或 Apache 许可证 2.0 的条款提供。\n\n有关许可证的详细信息，请参阅 LICENSE-APACHE 和 LICENSE-MIT 文件。","# AIChat 快速上手指南\n\nAIChat 是一款功能强大的全能 LLM 命令行工具，支持 Shell 助手、交互式 REPL、RAG（检索增强生成）、AI 智能体及多模型提供商集成。\n\n## 环境准备\n\n- **操作系统**：macOS, Linux, Windows (包括 WSL), Android (Termux)\n- **前置依赖**：无特殊依赖，二进制文件可直接运行。若通过 Rust 安装，需预先安装 Rust 工具链。\n- **网络要求**：需要能够访问配置的 LLM 提供商 API（如 OpenAI, Claude, Ollama 等）。\n\n## 安装步骤\n\n根据你的系统环境，选择以下任意一种方式安装：\n\n### 1. 使用包管理器（推荐）\n\n*   **Rust 用户**:\n    ```bash\n    cargo install aichat\n    ```\n*   **macOS \u002F Linux (Homebrew)**:\n    ```bash\n    brew install aichat\n    ```\n*   **Arch Linux (Pacman)**:\n    ```bash\n    pacman -S aichat\n    ```\n*   **Windows (Scoop)**:\n    ```bash\n    scoop install aichat\n    ```\n*   **Android (Termux)**:\n    ```bash\n    pkg install aichat\n    ```\n\n### 2. 手动安装二进制文件\n\n访问 [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Freleases) 下载对应系统的预编译二进制文件，解压后将 `aichat` 可执行文件添加到系统的 `$PATH` 环境变量中即可。\n\n## 基本使用\n\n### 1. 初始化配置\n\n首次运行前，需配置 API Key 和首选模型。运行以下命令进入交互向导：\n\n```bash\naichat --configure\n```\n*按提示输入你的 LLM 提供商（如 `openai`, `ollama`, `claude` 等）及对应的 API Key。*\n\n### 2. CMD 模式（单次问答）\n\n直接在终端发送指令并获取回复，适合脚本调用或快速查询：\n\n```bash\n# 简单对话\naichat \"如何用 Rust 编写一个 Hello World？\"\n\n# 结合管道使用 (Shell 助手)\ngit diff | aichat \"解释这段代码变更\"\n\n# 读取文件内容进行分析\naichat -f README.md \"总结这个项目的主要功能\"\n```\n\n### 3. REPL 模式（交互式会话）\n\n启动交互式聊天界面，支持多轮对话、上下文记忆、自动补全和历史记录搜索：\n\n```bash\naichat\n```\n\n**常用交互命令：**\n- 直接输入文字即可对话。\n- `.file \u003C路径>`：加载本地文件、目录或远程 URL 到上下文。\n- `.role \u003C名称>`：切换预设角色（如 `coder`, `translator`）。\n- `.session`：管理会话历史，保持上下文连续性。\n- `.exit` 或 `Ctrl+D`：退出 REPL。\n\n### 4. 高级功能速览\n\n- **Shell 助手**：在 REPL 中输入自然语言描述任务，AI 将生成并允许你直接执行对应的 Shell 命令。\n- **本地服务**：运行 `aichat --serve` 可启动本地 HTTP 服务器，提供兼容 OpenAI 格式的 API 接口及 Web 调试界面（LLM Playground\u002FArena）。\n- **多模型支持**：支持 OpenAI, Claude, Gemini, Ollama, Deepseek, Qianwen (通义千问) 等 20+ 主流模型，可在配置中自由切换。","一位后端开发者需要在陌生的 Linux 服务器上快速排查复杂的日志错误，并生成修复脚本。\n\n### 没有 aichat 时\n- **切换繁琐**：必须在浏览器中打开多个 AI 网页端，手动复制粘贴日志片段，上下文切换严重打断思路。\n- **命令生硬**：面对不熟悉的系统工具（如 `awk` 或 `sed`），需反复搜索语法文档，难以凭记忆写出精准的单行命令。\n- **上下文丢失**：多轮对话中，网页端容易遗忘之前的文件路径或错误代码，导致每次提问都要重新陈述背景。\n- **操作割裂**：从获取 AI 建议到终端执行命令需要手动输入，无法直接利用 AI 生成的脚本逻辑，效率低下。\n\n### 使用 aichat 后\n- **终端直达**：直接在 REPL 模式下通过 `.file error.log` 加载本地日志，无需离开终端即可与 AI 对话分析根因。\n- **智能生成**：利用 Shell Assistant 功能，用自然语言描述“提取过去 5 分钟所有 503 错误的 IP\"，aichat 自动适配当前 Shell 生成可执行命令。\n- **会话保持**：开启 Session 模式，aichat 自动记住之前的日志内容和排查进度，后续追问无需重复提供背景信息。\n- **一键执行**：对于 AI 生成的修复脚本，可直接在交互界面确认并运行，甚至将常用排查步骤保存为 Macro 宏，实现自动化复用。\n\naichat 将分散的搜索、编码与执行流程融合在终端一线，让开发者仅凭自然语言即可高效驾驭复杂的系统运维任务。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fsigoden_aichat_b2f89dd9.png","sigoden",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fsigoden_72f7dbce.png","sigoden@gmail.com","https:\u002F\u002Fgithub.com\u002Fsigoden",[81,85,89,93,97],{"name":82,"color":83,"percentage":84},"Rust","#dea584",81.9,{"name":86,"color":87,"percentage":88},"HTML","#e34c26",13.3,{"name":90,"color":91,"percentage":92},"Shell","#89e051",3.2,{"name":94,"color":95,"percentage":96},"PowerShell","#012456",1.1,{"name":98,"color":99,"percentage":100},"Nushell","#4E9906",0.5,9748,679,"2026-04-04T09:16:47","Apache-2.0","Linux, macOS, Windows, Android (Termux)","未说明",{"notes":108,"python":106,"dependencies":109},"该工具是基于 Rust 编写的独立二进制文件，无需安装 Python 或配置复杂的深度学习环境。支持通过包管理器（如 cargo, brew, scoop, pacman）直接安装，或下载预编译二进制文件使用。运行时需要配置相应的大模型服务商 API Key（支持 OpenAI、Claude、Ollama 等 20+ 提供商）。若使用 Ollama 等本地模型，则需额外满足对应本地模型的硬件需求。",[110,111],"Rust (用于编译)","无主要 Python 依赖",[26,53,13,14,15],[114,115,116,117,118,119,120,121,122,123,124,125,126,127],"claude","gemini","ollama","openai","function-calling","cli","llm","rag","ai","rust","ai-agents","chatbot","shell","webui","2026-03-27T02:49:30.150509","2026-04-06T07:13:10.425160",[131,136,140,145,150,155,159],{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},14972,"如何配置环境变量以支持多个平台，而不使用配置文件？","如果只想运行单个平台，可以结合 `{client}_API_KEY` 设置 `AICHAT_PLATFORM` 环境变量来运行 aichat（如果存在配置文件，环境变量将被忽略）。但是，如果要支持多个平台，必须使用配置文件（config.yaml），无法仅通过环境变量实现多平台支持。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F687",{"id":137,"question_zh":138,"answer_zh":139,"source_url":135},14973,"在 REPL 模式下使用编辑器时，临时文件后缀是 .txt 导致格式化失败，如何改为 .md？","目前临时文件默认使用 `.txt` 扩展名。虽然可以通过 Neovim 的 autocmd 检测 `\u002Ftmp\u002Faichat-` 路径并强制设置 filetype 为 markdown 来解决高亮问题，但这可能导致 `cbfmt` 等工具因后缀名不匹配而失效。当前版本可能尚未直接在配置文件中选择扩展名的功能，建议关注后续更新或通过修改源码将临时文件后缀硬编码为 `.md`。",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},14974,"使用 Ollama 模型时报错\"Exceed max_input_tokens limit\"，即使指定了其他模型也无效，如何解决？","这是一个已知问题，当角色（role）未明确绑定特定模型或配置顺序不当时，可能会错误地使用列表中第一个模型的 token 限制。解决方法是将所需的大上下文模型（如 codestral）放在 `config.yaml` 中 `models` 列表的第一位，或者确保在 `roles.yaml` 中正确指定了 `model: \"ollama:model_name\"`。如果仍然报错 \"Unknown client ''\"，请检查配置格式是否正确，并确保已提交修复该逻辑的 PR 或更新到最新版本。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F734",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},14975,"运行 aichat 时报错\"No such file or directory\"，提示找不到配置目录，如何解决？","如果未通过 `cargo install` 安装而是直接运行二进制文件，`.config\u002Faichat` 目录可能不会自动创建。解决方法是手动创建该目录，或者检查是否设置了 `AICHAT_CONFIG_FILE` 环境变量。如果没有设置该变量且默认目录不存在，程序会报错。确保环境干净（执行 `git clean` 和 `reset --hard` 后重新编译）通常也能解决因构建残留导致的路径问题。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F732",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},14976,"如何在 REPL 模式中清屏而不退出会话或切换上下文？","目前可以通过输入 `.clear` 命令来清屏。其实现原理是打印与终端高度相同数量的换行符，从而将之前的输出挤出可视区域。例如在源码中实现为：`println!(\"{}\", \"\\n\".repeat(terminal_height))`。注意，这与清除消息历史不同，若要清除消息历史请使用 `.empty session`。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F1479",{"id":156,"question_zh":157,"answer_zh":158,"source_url":135},14977,"Copilot 认证令牌过期太快，是否有自动刷新机制？","目前 Copilot 的 auth token 生命周期很短（少于一小时），过期后会导致请求失败。当前版本尚未内置自动刷新机制，用户需要在失败后退出程序、重新加载密钥并重启会话。建议关注项目后续更新以获取自动刷新功能的支持。",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},14978,"配置 Azure OpenAI 时调用 API 失败，报错\"error sending request\"，如何排查？","确保 `config.yaml` 中的 `api_base` 地址完整且正确（应包含部署名称，如 `https:\u002F\u002F\u003Cresource>.openai.azure.com`），并且 `models` 部分定义的 `name` 与 Azure 门户中的部署名称一致。同时检查 `api_key` 是否有效。如果使用的是特定 API 版本，请确认 URL 中的 `api-version` 参数是否与 Azure 服务端兼容。建议使用相同的配置在 Python 脚本中测试，以排除网络或权限问题。","https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F1178",[165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,255,260],{"id":166,"version":167,"summary_zh":168,"released_at":169},81810,"v0.30.0","## 新特性\n- 添加对 OSC52 剪贴板代码的支持 ([#1280](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1280))\n- 放弃对 lingyiwanwu 客户端的支持 ([#1327](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1327))\n- 支持自动检测深色\u002F浅色主题 ([#1335](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1335))\n- 增强 `.regenerate` 功能 ([#1340](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1340))\n- 使用 Ctrl+J 插入换行符 ([#1342](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1342))\n\n## Bug 修复\n- 在代理模式下使用工具 ([#1252](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1252))\n- 为 Vi 模式下的插入\u002F正常模式添加可视化提示 ([#1279](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1279))\n- 改进 macOS 上 `aichat -e` 的错误处理 ([#1311](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1311))\n- OpenAI API 在 tool_calls 消息中遗漏了 content 字段 ([#1326](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1326))\n- 更改 temperature\u002Ftop_p 的读取规则 ([#1333](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1333))\n- `.file` 外部命令捕获 stdout\u002Fstderr 输出 ([#1343](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1343))\n\n## 新贡献者\n* @laktak 在 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1279 中完成了首次贡献\n* @gcv 在 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1280 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.29.0...v0.30.0","2025-07-06T23:48:31",{"id":171,"version":172,"summary_zh":173,"released_at":174},81811,"v0.29.0","## 新特性\n\n- 添加 `cmd_prelude` 并移除 `prelude` ([#1197](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1197))\n- 支持 claude-3-7-sonnet ([#1201](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1201))\n- 将 Azure OpenAI API 版本升级至 2024-12-01-preview ([#1205](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1205))\n- `--code`（tty）会移除 `\u003Cthink>` 标签 ([#1227](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1227))\n- 增强 `--file` 和 RAG 文档的 glob 匹配功能 ([#1230](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1230))\n- 支持通过 HISTFILE 指定 bash\u002Fzsh 的历史文件 ([#1236](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1236))\n\n## Bug 修复\n\n- 在会话上下文中切换角色时，模型显示不正确 ([#1192](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1192))\n- Bedrock 能够正确处理空的工具调用参数 ([#1213](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1213))\n- 兼容 OpenAI 的接口能够正确处理空的工具调用参数 ([#1217](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1217))\n- 工具调用时遗漏了 `\u003C\u002Fthink>` 标签 ([#1226](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1226))\n\n## 新贡献者\n* @dbroeglin 在 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1205 中完成了首次贡献\n* @blankjul 在 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1213 中完成了首次贡献\n* @cramosc 在 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1236 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.28.0...v0.29.0","2025-03-28T00:57:45",{"id":176,"version":177,"summary_zh":178,"released_at":179},81812,"v0.28.0","## 新特性\n\n- 显示推理标记 ([#1139](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1139))\n- WebUI 支持 `think` 标签 ([#1140](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1140))\n- 去除推理内容 ([#1141](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1141))\n- 支持模型别名 ([#1150](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1150))\n- 增强 `.file` 文件，以从多种来源加载资源 ([#1155](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1155))\n- 在配置初始化时支持选择 LLM ([#1158](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1158))\n- 在配置初始化时支持拉取模型 ([#1161](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1161))\n- 新增模型字段 `system_prompt_prefix` ([#1163](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1163))\n- 移除 Ollama 的预定义模型 ([#1165](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1165))\n- 添加模型字段 `patch` ([#1169](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1169))\n- 为 OpenAI\u002FGitHub o* 系列模型添加 `max_tokens: null` 补丁 ([#1174](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1174))\n- 移除对 Hyperbolic 和 Novita 的支持 ([#1176](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1176))\n- 移除对 Fireworks\u002FSiliconFlow\u002FTogether 的支持 ([#1181](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1181))\n- OpenAI\u002FGitHub 提供商新增 `o3-mini-high` 模型 ([#1182](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1182))\n\n## Bug 修复\n\n- 包含 `tool_calls` 的消息未保存到 `messages.md` 文件中 ([#1156](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1156))\n- WebUI 会话无法持久化系统提示词 ([#1162](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1162))\n- WebUI 设置无法正常工作 ([#1175](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1175))\n- 更好地处理 OpenAI 兼容的流式响应 ([#1184](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1184))\n\n## 新贡献者\n* @mtul0729 在 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1138 中做出了首次贡献\n* @wwsheng009 在 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1184 中做出了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.27.0...v0.28.0","2025-02-18T12:04:53",{"id":181,"version":182,"summary_zh":183,"released_at":184},81813,"v0.27.0","## REPL 变更\n\n```\r\n.file %%                                  # 使用 `%%` 包含上次回复\r\n.file `git diff`                          # 使用 `\u003Ccmd>` 执行命令\r\n.macro \u003Cmacro> [arg]...                   # 执行宏\r\n.edit config                              # 修改配置文件\r\n.edit agent-config                        # 修改代理配置文件\r\n.agent \u003Cagent> \u003Cvariable:key=value>...    # 接受代理变量\r\n```\r\n\r\n## 新的 CLI 选项\r\n\r\n```\r\n  --rebuild-rag                    重建 RAG 以同步文档更改\r\n  --macro \u003CMACRO>                  执行宏\r\n  --list-macros                    列出所有宏\r\n  --sync-models                    同步模型更新\r\n```\r\n\r\n## 新增提供商\r\n\r\n- minimax\r\n- hyperbolic\r\n- novita\r\n\r\n## 新特性\r\n\r\n- 添加 CLI 选项 `--rebuild-rag` ([#1074](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1074))\r\n- `.file` 支持执行外部命令 ([#1075](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1075))\r\n- `.file` 支持使用 `%%` 包含上次回复 ([#1079](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1079))\r\n- 停用 `rag_min_score_*` 配置项 ([#1081](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1081))\r\n- 支持默认终端编辑器 ([#1082](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1082))\r\n- 不再支持 `.set agent_prelude \u003Cvalue>` ([#1086](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1086))\r\n- 支持宏 ([#1087](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1087))\r\n- `.agent` 接受变量键值对 ([#1090](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1090))\r\n- 支持 minimax 客户端 ([#1091](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1091))\r\n- 不再支持 `.variable` REPL 命令 ([#1092](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1092))\r\n- `.starter` 接受非文本索引 ([#1093](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1093))\r\n- 为 ollama 添加默认 base_url ([#1102](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1102))\r\n- 支持 `.edit config` 和 `.edit agent-config` REPL 命令 ([#1103](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1103))\r\n- 添加 `--sync-models` CLI 选项 ([#1114](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1114))\r\n- 支持 hyperbolic 客户端 ([#1115](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1115))\r\n- ernie 迁移到 v2 API ([#1130](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1130))\r\n- 添加 novita 客户端 ([#1132](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1132))\r\n\r\n\r\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.26.0...v0.27.0","2025-01-28T01:39:34",{"id":186,"version":187,"summary_zh":188,"released_at":189},81814,"v0.26.0","## 新特性\n\n- 支持通过代理配置覆盖代理指令 ([#1057](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1057))\n- 支持 gemini-2.0-flash-thinking-exp 模型 ([#1067](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1067))\n\n## Bug 修复\n\n- 数组模式缺少 `items` 字段导致模式无效 ([#1049](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1049))\n- Windows 系统下 `.file` 路径参数无需使用双反斜杠 ([#1053](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1053))\n- 使用上次消息启动会话时，代理变量未被初始化 ([#1054](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1054))\n- 不再对输入文本进行去空格处理 ([#1056](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1056))\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.25.0...v0.26.0","2024-12-30T10:57:38",{"id":191,"version":192,"summary_zh":193,"released_at":194},81815,"v0.25.0","## 新特性\n\n- 在 REPL 的每个旋转图标期间处理 Ctrl+C 事件 ([#1014](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1014))\n- 支持所有代理环境变量，包括 NO_PROXY ([#1015](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1015))\n- 代理支持动态指令 ([#1023](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1023))\n- 将 Shell 执行命令追加到历史文件中 ([#1026](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1026))\n- 添加 CLI 选项 `--agent-variable \u003Cname> \u003Cvalue>` ([#1027](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1027))\n- `--file\u002F.file` 接受 document_loaders 中的文件格式 ([#1033](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1033))\n- WebUI Playground 支持内存中的多会话 ([#1035](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1035))\n- WebUI 支持 Markdown 中的数学公式 ([#1039](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1039))\n- 将 Cohere API 更新至 v2 ([#1041](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1041))\n\n## 错误修复\n\n- 针对部分 OpenAI 兼容客户端的流式函数调用 ([#1017](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1017))\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.24.0...v0.25.0","2024-12-10T04:45:21",{"id":196,"version":197,"summary_zh":198,"released_at":199},81816,"v0.24.0","## REPL 变更\r\n\r\n```diff\r\n- .save agent-config       将当前代理配置保存到文件\r\n+ .edit rag-docs           编辑 RAG 文档\r\n```\r\n\r\n## 新特性\r\n\r\n- `.info role`\u002F`.exit role` 适用于会话角色 ([#958](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F958))\r\n- 支持 `.edit rag-docs` ([#964](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F964))\r\n- 更改代理配置\u002F变量 ([#967](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F967))\r\n- 支持会话作用域的代理变量 ([#969](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F969))\r\n- `.agent` 接受会话名称 ([#970](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F970))\r\n- 添加配置 `user_agent` ([#971](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F971))\r\n- 支持使用环境变量覆盖代理配置 ([#974](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F974))\r\n- 添加 hunyuan 客户端 ([#980](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F980))\r\n- 移除对 Hugging Face 的支持 ([#988](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F988))\r\n- 支持环境变量 `\u003CAGENT_NAME>_CONFIG_FILE` ([#990](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F990))\r\n- 在会话中保存函数调用 ([#994](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F994))\r\n- 支持会话自动命名 ([#1001](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F1001))\r\n\r\n## 错误修复\r\n\r\n- 非流式 REPL 聊天中意外的 Ctrl-C\u002FCtrl-D 处理 ([#957](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F957))\r\n- WebUI 调用 o1-* 模型时出现不支持值错误 ([#983](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F983))\r\n- qianwen 多工具调用时请求无效 ([#993](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F993))","2024-11-25T09:39:02",{"id":201,"version":202,"summary_zh":203,"released_at":204},81817,"v0.23.0","## Break 更改\n\n### 尊重 `XDG_CONFIG_HOME` 以确定配置目录的位置\n\n### 移除 replicate 客户端，并取消对 octoai 的支持\n\n## REPL 更改\n\n```diff\n- .clear messages          清除当前会话中的消息\n+ .empty session           清除当前会话中的消息\n+ .compress session        压缩当前会话中的消息\n```\n\n## CLI 更改\n\n```diff\n+ --empty-session          确保会话为空\n```\n\n## 新特性\n\n- 向 RAG YAML 文件中添加 `batch_size` 参数 ([#876](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F876))\n- 在嵌入和重排序 API 调用中添加重试逻辑 ([#879](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F879))\n- 添加 `AICHAT_EMBEDDINGS_RETRY_LIMIT` 环境变量 ([#882](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F882))\n- 尊重 `XDG_CONFIG_HOME` 环境变量以确定配置目录的位置 ([#889](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F889))\n- 修改选择 Shell 命令操作的提示信息 ([#898](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F898))\n- 放弃使用 replicate 客户端 ([#900](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F900))\n- 移除对 octoai 的支持 ([#901](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F901))\n- 将输入保存到 `message.md` 文件时，使用文件路径而非文件内容 ([#905](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F905))\n- 添加 `.compress session` REPL 命令 ([#907](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F907))\n- prelude 支持 `\u003Csession>:\u003Crole>` 格式 ([#913](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F913))\n- 会话会持久化角色名称 ([#914](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F914))\n- Web UI 支持粘贴图片 ([#921](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F921))\n- 添加 CLI 选项 `--empty-session` ([#922](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F922))\n- 将 `.clear messages` 重命名为 `.empty session` ([#923](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F923))\n- 添加 Shell 操作 `copy` ([#926](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F926))\n- 支持 OpenAI o1 模型 ([#935](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F935))\n- 支持 xai (grok) 客户端 ([#945](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F945))\n\n## Bug 修复\n\n- 允许从特殊文件（设备、FIFO 等）读取 ([#886](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F886))\n- 在无 TTY 的情况下出现意外的 REPL 交互 ([#911](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F911))\n- prelude 只有在状态为空时才会生效 ([#920](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F920))\n- 在 macOS 上通过管道执行 Shell 命令时出现意外错误 ([#930](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F930))","2024-10-24T08:52:35",{"id":206,"version":207,"summary_zh":208,"released_at":209},81818,"v0.22.0","## RAG 变更说明\n\n### 将 RAG 以 YAML 格式存储，而非二进制格式\n\n过去我们使用二进制格式将 RAG 存储在 `\u003Caichat-config-dir>\u002Frags\u002F\u003Cname>.bin` 中。然而，二进制格式存在诸多缺点，因此我们现在改用 YAML 格式来存储 RAG。\n\n所有以二进制格式存储的 RAG 将被忽略，请重新以 YAML 格式创建它们。\n\n### 支持 RAG 作用域内的 `top_k` 和 `reranker_model` 选项\n\n现在，用户可以为每个 RAG 单独设置 `top_k` 和 `reranker_model` 参数。\n\n```yaml\n.set rag_top_k 5\n.set rag_reranker_model cohere:rerank-english-v3.0\n```\n\n## 新 REPL 命令\n\n```repl\n.delete                  删除角色\u002F会话\u002FRAG\u002F代理\n.save agent-config       将当前代理配置保存到文件\n.sources rag             查看上次查询中的 RAG 源\n```\n\n## 新特性\n\n- 添加配置项 `serve_addr` 和环境变量 `$SERVE_ADDR`，用于指定服务地址（[#839](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F839)）\n- 改进 HTML 到 Markdown 的转换器（[#840](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F840)）\n- 添加角色占位符 `%create-prompt%`（[#843](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F843)）\n- 容忍部分 RAG 文件加载失败的情况（[#846](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F846)）\n- 支持 RAG 作用域内的 `rag_top_k` 和 `rag_reranker_model`（[#847](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F847)）\n- 将 RAG 以 YAML 格式而非二进制格式保存（[#848](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F848)）\n- Chat Completions API 支持工具调用（[#850](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F850)）\n- 支持重排序 API（[#851](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F851)）\n- 废弃配置项 `rag_min_score_rerank`（[#852](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F852)）\n- 添加 `.delete` REPL 命令（[#862](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F862)）\n- 保存时若使用新名称，不删除现有角色或会话（[#863](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F863)）\n- 通过 `$AICHAT_SHELL` 指定 Shell（[#866](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F866)）\n- 角色\u002F会话\u002F代理不应继承全局的 `use_tools` 设置（[#868](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F868)）\n- 添加 `.save agent-config` REPL 命令（[#870](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F870)）\n- 添加 `.sources rag` REPL 命令（[#871](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F871)）\n\n## Bug 修复\n\n- 由于读取光标位置超时导致流式渲染失败（[#835](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F835)）","2024-09-18T00:21:05",{"id":211,"version":212,"summary_zh":213,"released_at":214},81819,"v0.21.1","## 变更内容\n* 修复：`:` 不得用作角色参数的分隔符 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F830\n* 新增功能：添加 SiliconFlow 客户端 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F831\n\n## v0.21.0 中的破坏性变更\n\n### 将 `roles.yaml` 替换为 `roles\u002F\u003Cname>.md`（参见 [#804](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F804)）\n\n### 将 `ollama`\u002F`qianwen`\u002F`cloudflare` 客户端迁移到 `openai-compatible`\n\n```diff\nclients:\n\n-  - type: ollama\n-    api_base: http:\u002F\u002Flocalhost:11434\n+  - type: openai-compatible\n+    name: ollama\n+    api_base: http:\u002F\u002Flocalhost:11434\u002Fv1\n\n-  - type: qianwen\n+  - type: openai-compatible\n+    name: qianwen\n\n-  - type: cloudflare\n-    account_id: xxx\n-    api_base: https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\n+  - type: openai-compatible\n+    name: cloudflare\n+    api_base: https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F{ACCOUNT_ID}\u002Fai\u002Fv1\n```","2024-09-04T00:03:49",{"id":216,"version":217,"summary_zh":218,"released_at":219},81820,"v0.21.0","## Break Changing\r\n\r\n### Replace `roles.yaml` with `roles\u002F\u003Cname>.md` (see [#804](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F804))\r\n\r\n### Migrate `ollama`\u002F`qianwen`\u002F`cloudflare` clients to `openai-compatible`\r\n\r\n```diff\r\nclients:\r\n\r\n-  - type: ollama\r\n-    api_base: http:\u002F\u002Flocalhost:11434\r\n+  - type: openai-compatible\r\n+    name: ollama\r\n+    api_base: http:\u002F\u002Flocalhost:11434\u002Fv1\r\n\r\n-  - type: qianwen\r\n+  - type: openai-compatible\r\n+    name: qianwen\r\n\r\n-  - type: cloudflare\r\n-    account_id: xxx\r\n-    api_base: https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\r\n+  - type: openai-compatible\r\n+    name: cloudflare\r\n+    api_base: https:\u002F\u002Fapi.cloudflare.com\u002Fclient\u002Fv4\u002Faccounts\u002F{ACCOUNT_ID}\u002Fai\u002Fv1\r\n```\r\n\r\n## Clients Changes\r\n\r\n- migrate ollama to openai-compatible\r\n- migrate qianwen to openai-compatible\r\n- migrate cloudflare to openai-compatible\r\n- add github\r\n- add ai21\r\n- add huggingface\r\n\r\n## New Features\r\n\r\n- support builtin website crawling (recursive_url) ([#786](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F786))\r\n- no check model's support for function calls ([#791](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F791))\r\n- enable custom `api_base` for most clients ([#793](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F793))\r\n- support github client ([#798](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F798))\r\n- support ai21 client ([#800](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F800))\r\n- replace `roles.yaml` with `roles\u002F\u003Cname>.md` ([#810](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F810))\r\n- save temp session with `temp-\u003Ctimestamp>` if `save_session: true` ([#811](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F811))\r\n- webui use querystring as settings ([#814](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F814))\r\n- webui support RAG ([#815](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F815))\r\n- migrate `ollama`\u002F`qianwen` clients to `openai-compatible` ([#816](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F816))\r\n- migrate `cloudflare` client to `openai-compatible` ([#821](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F821))\r\n- add huggingface client ([#822](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F822))\r\n- use dynamic batch size for embedding ([#826](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F826))\r\n\r\n## Bug Fixes\r\n\r\n- incorrect function call handling with session in non-REPL ([#777](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F777))\r\n- claude fails to run tools with zero arguments ([#780](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F780))\r\n- invalid model error while switching roles if the model_id is same to current ([#788](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F788))\r\n- incomplete stream response in proxy LLM api ([#796](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F796))\r\n","2024-09-03T09:04:41",{"id":221,"version":222,"summary_zh":223,"released_at":224},81821,"v0.20.0","## Patch Client API\r\n\r\nAIChat supports patching API request url, headers and body.\r\n\r\nFor example, we can patch claude:claude-3-5-sonnet-20240620 to use beta 8192 output tokens.\r\n\r\n```yaml\r\nclients:\r\n  - type: claude\r\n    ...\r\n    patch:                                # Patch api request\r\n      chat_completions:                   # Api type, one of chat_completions, embeddings, and rerank\r\n        'claude-3-5-sonnet-20240620':     # The regex to match model names, e.g. '.*' 'gpt-4o' 'gpt-4o|gpt-4-.*'\r\n          headers:\r\n            anthropic-beta: max-tokens-3-5-sonnet-2024-07-15\r\n          body:\r\n            max_tokens: 8192\r\n```\r\n\r\n## More flexible using tools\r\n\r\nAIChat introduces the `use_tools` configuration to manage which tools are included. This configuration works across global, role, session, and agent levels.\r\nAIChat also introduces `mapping_tools` for managing aliases for a tool or toolset.\r\n\r\n```yaml\r\nmapping_tools:\r\n  fs: 'fs_cat,fs_ls,fs_mkdir,fs_rm,fs_write'\r\nuse_tools: 'execute_command,fs'\r\n```\r\n\r\n## Configuration Changes\r\n\r\n```diff\r\n- buffer_editor: null\r\n+ editor: null\r\n\r\n- dangerously_functions_filter: null\r\n- agents:\r\n-   - name: todo\r\n-     ...\r\n```\r\n\r\nThe tool determines whether the operation is dangerous and whether to ask for confirmation, the `dangerously_functions_filter` is unnecessary.\r\n\r\nEach AI agent has its own `config.yaml` file, there is no need for a central `agents` configuration.\r\n\r\n## Enviroment Variables Changes\r\n\r\n- AIChat supports env file (`\u003Caichat-config-dir>\u002F.env`) for managing environment variables.\r\n\r\n- All config items have related environment variables to override their values.\r\n\r\n  > For example, we can use `AICHAT_MODEL` to override the default LLM and `AICHAT_LIGHT_THEME` to switch to light theme.\r\n\r\n- AIChat Supports env `AICHAT_PATCH_{client}_CHAT_COMPLETIONS` for patching chat completions api request url, headers and body.\r\n\r\n  > For example, set `AICHAT_PATCH_OPENAI_CHAT_COMPLETIONS='{\"gpt-4o\":{\"body\":{\"seed\":666,\"temperature\":0}}}'` to make gpt-4o more deterministic.\r\n\r\n## Client Changes\r\n\r\n- `vertexai` client supports cluade\u002Fmistral models, `vertexai-claude` client was abandoned.\r\n- `bedrock` client switch to converse api, supports llama3.1\u002Fmistral-large-v2\u002Fcohere.command-r models.\r\n- `rag-dedicated` client was abandoned, use `openai-compatible` client instead.\r\n\r\n\r\n## CLI Changes\r\n\r\n```diff\r\n-  -w, --wrap \u003CWRAP>          Control text wrapping (no, auto, \u003Cmax-width>)\r\n-  -H, --no-highlight         Turn off syntax highlighting\r\n-      --light-theme          Use light theme\r\n```\r\n> Use environment variables AICHAT_WRAP, AICHAT_HIGHLIGHT and AICHAT_LIGHT_THEME instead.\r\n\r\n## New REPL Commands\r\n\r\n```\r\n.variable \u003Cname> \u003Cvalue>\r\n.set stream false\r\n.set use_tools \u003Ctools>\r\n```\r\n\r\n## New Features\r\n\r\n- load env vars from file ([#685](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F685))\r\n- enhenced flexibility for use tools ([#688](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F688))\r\n- agent can reuse tools ([#690](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F690))\r\n- support agent variables ([#692](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F692))\r\n- `--file\u002F.file` can load dirs ([#693](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F693))\r\n- adjust the way of obtaining function call results ([#695](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F695))\r\n- webui supports text to speech for messages ([#712](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F712))\r\n- enhance logger ([#731](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F731))\r\n- move agent config to separate file ([#741](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F741))\r\n- webui add autofocus to chat-input in textarea ([#742](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F742))\r\n- merge vertexai-cluade with vertexai ([#745](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F745))\r\n- vertexai support mistral models ([#746](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F746))\r\n- ollama support tools and new embeddings api ([#748](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F748))\r\n- all config fields have related environment variables ([#751](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F751))\r\n- bedrock client switch to converse api and support cohere models ([#747](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F747))\r\n- support patching request url, headers and body ([#756](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F756))\r\n- abandon rag_dedicated client and improve ([#757](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F757))\r\n- abandon cli options --wrap, --no-highlight and --light-theme ([#758](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F758))\r\n- add `config.stream` and `.set stream` repl command ([#759](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F759))\r\n- export agent variable as `LLM_AGENT_VAR_*` ([#766](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F766))\r\n- add agent-scoped `agent_prelude` config ([#770](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F770))\r\n- rename `config.buffer_editor` to `config.editor` ([#773](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F773))\r\n\r\n## Bug Fixes\r\n\r\n- `.starter` tab completion ([#709](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat","2024-08-02T10:03:00",{"id":226,"version":227,"summary_zh":228,"released_at":229},81822,"v0.19.0","## Support RAG\r\n\r\nSeamlessly integrates document interactions into your chat experience.\r\n\r\n![aichat-rag](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fassets\u002F4012553\u002F6f3e5908-9c95-4d7d-aa9c-7e973ecf9354)\r\n\r\n## Support AI Agent\r\n\r\nAI Agent = Prompt (Role) + Tools (Function Callings) + Knowndge (RAG). It's also known as OpenAI's GPTs.\r\n\r\n![aichat-agent](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fassets\u002F4012553\u002F7308a423-2ee5-4847-be1b-a53538bc98dc)\r\n\r\n## New Platforms\r\n\r\n- lingyiwanwu(01ai)\r\n- voyageai\r\n- jina\r\n\r\n## New Models\r\n\r\n- claude:claude-3-5-sonnet-20240620\r\n- vertexai:gemini-1.5-pro-001\r\n- vertexai:gemini-1.5-flash-001\r\n- vertexai-claude:claude-3-5-sonnet@20240620\r\n- bedrock:anthropic.claude-3-5-sonnet-20240620-v1:0\r\n- zhipuai:glm-4-0520\r\n- lingyiwanwu:yi-large*\r\n- lingyiwanwu:yi-medium*\r\n- lingyiwanwu:yi-spark\r\n\r\n> All embedding\u002Freranker models are ignored\r\n\r\n## New Configuration\r\n\r\n```yaml\r\nrepl_prelude: null               # Overrides the `prelude` setting specifically for conversations started in REPL\r\nagent_prelude: null              # Set a session to use when starting a agent. (e.g. temp, default)\r\n\r\n# Regex for seletecting dangerous functions\r\n# User confirmation is required when executing these functions\r\n# e.g. 'execute_command|execute_js_code' 'execute_.*'\r\ndangerously_functions_filter: null\r\n# Per-Agent configuration\r\nagents:\r\n  - name: todo-sh\r\n    model: null\r\n    temperature: null\r\n    top_p: null\r\n    dangerously_functions_filter: null\r\n\r\n# Define document loaders to control how RAG and `.file`\u002F`--file` load files of specific formats.\r\ndocument_loaders:\r\n  # You can add custom loaders using the following syntax:\r\n  #   \u003Cfile-extension>: \u003Ccommand-to-load-the-file>\r\n  # Note: Use `$1` for input file and `$2` for output file. If `$2` is omitted, use stdout as output.\r\n  pdf: 'pdftotext $1 -'                         # Load .pdf file, see https:\u002F\u002Fpoppler.freedesktop.org\r\n  docx: 'pandoc --to plain $1'                  # Load .docx file\r\n  # xlsx: 'ssconvert $1 $2'                     # Load .xlsx file\r\n  # html: 'pandoc --to plain $1'                # Load .html file\r\n  recursive_url: 'rag-crawler $1 $2'            # Load websites, see https:\u002F\u002Fgithub.com\u002Fsigoden\u002Frag-crawler\r\n\r\n# ---- RAG ----\r\nrag_embedding_model: null         # Specifies the embedding model to use\r\nrag_reranker_model: null          # Specifies the rerank model to use\r\nrag_top_k: 4                      # Specifies the number of documents to retrieve\r\nrag_chunk_size: null              # Specifies the chunk size\r\nrag_chunk_overlap: null           # Specifies the chunk overlap\r\nrag_min_score_vector_search: 0    # Specifies the minimum relevance score for vector-based searching\r\nrag_min_score_keyword_search: 0   # Specifies the minimum relevance score for keyword-based searching\r\nrag_min_score_rerank: 0           # Specifies the minimum relevance score for reranking\r\nrag_template: ...\r\n\r\nclients:\r\n  - name: localai\r\n    models:\r\n      - name: xxxx                                  # Embedding model\r\n        type: embedding\r\n        max_input_tokens: 2048\r\n        default_chunk_size: 2000                        \r\n        max_batch_size: 100\r\n      - name: xxxx                                  # Reranker model\r\n        type: reranker \r\n        max_input_tokens: 2048\r\n```\r\n\r\n## New REPL Commands\r\n\r\n```\r\n.edit session            Edit the current session with an editor\r\n\r\n.rag                     Init or use the RAG\r\n.info rag                View RAG info\r\n.rebuild rag             Rebuild the RAG to sync document changes\r\n.exit rag                Leave the RAG\r\n\r\n.agent                   Use a agent\r\n.info agent              View agent info\r\n.starter                 Use the conversation starter\r\n.exit agent              Leave the agent\r\n\r\n.continue                Continue the response\r\n.regenerate              Regenerate the last response\r\n```\r\n\r\n## New CLI Options\r\n\r\n```\r\n  -a, --agent \u003CAGENT>        Start a agent\r\n  -R, --rag \u003CRAG>            Start a RAG\r\n      --list-agents          List all agents\r\n      --list-rags            List all RAGs\r\n```\r\n\r\n## Break Changing\r\n\r\n### Some client fields have changed\r\n\r\n```diff\r\nclients:\r\n  - name: myclient\r\n    patches: \r\n      \u003Cregex>:\r\n-       request_body:\r\n+       chat_completions_body:           \r\n    models:\r\n    - name: mymodel\r\n      max_output_tokens: 4096\r\n-     pass_max_tokens: true\r\n+     require_max_tokens: true\r\n\r\n```\r\n\r\n### The way to identify dangerous functions has changed\r\n\r\nPrevious we treats function name that starts with `may_` as execute type (dangerously). This method requires modifying function names, which is inflexible.\r\n\r\nNow we makes it configurable. In `config.yaml`, you can now define which functions are considered dangerous and require user confirmation .\r\n\r\n```yaml\r\ndangerously_functions_filter: 'execute_.*'\r\n```\r\n\r\n## New Features\r\n\r\n- support RAG ([#560](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F560))\r\n- custom more path to file\u002Fdirs with environment variables ([#565](https:\u002F\u002Fgit","2024-07-03T23:21:41",{"id":231,"version":232,"summary_zh":233,"released_at":234},81823,"v0.18.0","## Break Changing\r\n\r\n### Add custom request parameters based on `patch`, other than `extra_fields`\r\n\r\nWe used to add request parameters to models using `extra_fields`, but this approach lacked flexibility. We've now switched to a `patch` mechanism, which allows for customizing request parameters for one or more models.\r\n\r\nThe following examples enable web search functionality for all Cohere models.\r\n\r\n```yaml\r\n  - type: cohere\r\n    patches:\r\n      \".*\":\r\n        request_body:\r\n          connectors:\r\n            - id: web-search\r\n```\r\n\r\n### Remove all tokenizers\r\n\r\nDifferent platforms may utilize varying tokenizers for their models, even across versions of the same model. For example, gpt-4 uses `o200k_base` while gpt-4-turbo and gpt-3.5-turbo employ `cl100k_base.`\r\n\r\nAIChat supports 100 models, It's impossible to support all tokenizers, so we're removing them entirely and switching to a estimation algorithm.\r\n\r\n\r\n## Function Calling\r\n\r\nFunction calling supercharges LLMs by connecting them to external tools and data sources. This unlocks a world of possibilities, enabling LLMs to go beyond their core capabilities and tackle a wider range of tasks.\r\n\r\nWe have created a new repository to help you make the most of this feature: [https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Fllm-functions)\r\n\r\nHere's a glimpse of what function calling can do for you:\r\n\r\n![image](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fassets\u002F4012553\u002Fc1b6b136-bbd3-4028-9b01-7d728390c0bf)\r\n\r\n## New Models\r\n\r\n- gemini:gemini-1.5-flash-latest\r\n- gemini-1.5-flash-preview-0514\r\n- qianwen:qwen-long\r\n\r\n## Features\r\n\r\n- Allow binding model to the role ([#505](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F505))\r\n- Remove tiktoken ([#506](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F506))\r\n- Support function calling ([#514](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F514))\r\n- Webui add toolbox(copy-bt\u002Fregenerate-btn) to message ([#521](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F521))\r\n- Webui operates independently from aichat ([#527](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F527))\r\n- Allow patching req body with client config ([#534](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F534))\r\n\r\n## Bug Fixes\r\n\r\n- No builtin roles if no roles.yaml ([#509](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F509))\r\n- Unexpect enter repl if have pipe-in but no text args ([#512](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F512))\r\n- Panic when check api error ([#520](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F520))\r\n- Webui issue with image ([#523](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F523))\r\n- Webui message body do not autoscroll to bottom sometimes ([#525](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F525))\r\n- JSON stream parser and refine client modules ([#538](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F538))\r\n- Bedrock issues ([#544](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fissues\u002F544))\r\n\r\n## New Contributors\r\n* @rolfwilms made their first contribution in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F544\r\n* @ProjectMoon made their first contribution in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F549\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.17.0...v0.18.0","2024-06-01T02:55:58",{"id":236,"version":237,"summary_zh":238,"released_at":239},81824,"v0.17.0","## Break Changing\r\n\r\n- always use stream unless set `--no-stream` explicitly (#415)\r\n- vertexai config changed: replace `api_base` with `project_id`\u002F`location`\r\n\r\n## Self-Hosted Server\r\n\r\nAIChat comes with a built-in lightweight web server:\r\n\r\n- Provide access to all LLMs using OpenAI format API\r\n- Host LLM playground\u002Farena web applications\r\n\r\n```\r\n$ aichat --serve\r\nChat Completions API: http:\u002F\u002F127.0.0.1:8000\u002Fv1\u002Fchat\u002Fcompletions\r\nLLM Playground:       http:\u002F\u002F127.0.0.1:8000\u002Fplayground\r\nLLM ARENA:            http:\u002F\u002F127.0.0.1:8000\u002Farena\r\n```\r\n\r\n## New Clients\r\n\r\nbedrock, vertex-claude, cloudflare, groq, perplexity, replicate, deepseek, zhipuai, anyscale, deepinfra, fireworks, openrouter, octoai, together\r\n\r\n## New REPL Command\r\n\r\n```\r\n.prompt                  Create a temporary role using a prompt\r\n.set max_output_tokens\r\n```\r\n\r\n```\r\n> .prompt your are a js console\r\n\r\n%%> Date.now()\r\n1658333431437\r\n\r\n.set max_output_tokens 4096\r\n```\r\n\r\n## New CLI Options\r\n\r\n```\r\n--serve [\u003CADDRESS>]    Serve the LLM API and WebAPP\r\n--prompt \u003CPROMPT>      Use the system prompt\r\n```\r\n\r\n## New Configuration Fields\r\n\r\n```yaml\r\n# Set default top-p parameter\r\ntop_p: null\r\n# Command that will be used to edit the current line buffer with ctrl+o\r\n# if unset fallback to $EDITOR and $VISUAL\r\nbuffer_editor: null\r\n```\r\n\r\n## New Features\r\n\r\n- add completion scripts ([#411](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F411))\r\n- shell commands support revision\r\n- add `.prompt` repl command ([#420](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F420))\r\n- customize model's max_output_tokens ([#428](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F428))\r\n- builtin models can be overwritten by models config ([#429](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F429))\r\n- serve all LLMs as OpenAI-compatible API ([#431](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F431))\r\n- support customizing `top_p` parameter ([#434](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F434))\r\n- run without config file by set `AICHAT_CLIENT` ([#452](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F452))\r\n- add `--prompt` option ([#454](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F454))\r\n- non-streaming returns tokens usage ([#458](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F458))\r\n- `.model` repl completions show max tokens and price ([#462](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F462))","2024-05-13T22:43:39",{"id":241,"version":242,"summary_zh":243,"released_at":244},81825,"v0.16.0","## New Models\r\n\r\n- openai:gpt-4-turbo\r\n- gemini:gemini-1.0-pro-latest (replace gemini:gemini-pro)\r\n- gemini:gemini-1.0-pro-vision-latest (replace gemini:gemini-pro-vision)\r\n- gemini:gemini-1.5-pro-latest\r\n- vertexai:gemini-1.5-pro-preview-0409\r\n- cohere:command-r\r\n- cohere:command-r-plus\r\n\r\n## New Config\r\n\r\n```yaml\r\nctrlc_exit: false                # Whether to exit REPL when Ctrl+C is pressed\r\n```\r\n\r\n## New Features\r\n\r\n- use ctrl+enter to newline in REPL ([#394](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F394))\r\n- support cohere ([#397](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F397))\r\n- -f\u002F--file take one value and do not enter REPL ([#399](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F399))\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.15.0...v0.16.0","2024-04-11T00:41:11",{"id":246,"version":247,"summary_zh":248,"released_at":249},81826,"v0.15.0","## Breaking Changes\r\n\r\n### Rename client localai to openai-compatible ([#373](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F373))\r\n```diff\r\nclients:\r\n--  type: localai\r\n++  type: openai-compatible\r\n++  name: localai\r\n```\r\n\r\n### Gemini\u002FVertexAI clients add `block_threshold` configuration ([#375](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F375))\r\n\r\n```yaml\r\nblock_threshold: BLOCK_ONLY_HIGH # Optional field\r\n```\r\n\r\n## New Models\r\n\r\n- claude:claude-3-haiku-20240307\r\n- ernie:ernie-4.0-8k\r\n- ernie:ernie-3.5-8k\r\n- ernie:ernie-3.5-4k\r\n- ernie:ernie-speed-8k\r\n- ernie:ernie-speed-128k\r\n- ernie:ernie-lite-8k\r\n- ernie:ernie-tiny-8k\r\n- moonshot:moonshot-v1-8k\r\n- moonshot:moonshot-v1-32k\r\n- moonshot:moonshot-v1-128k\r\n\r\n## New Config\r\n\r\n```yaml\r\nsave_session: null              # Whether to save the session, if null, asking\r\n```\r\n\r\n## CLI Changes\r\n\r\n### New REPL Commands\r\n```\r\n.save session [name]                  \r\n.set save_session \u003Cnull|true|false>   \r\n.role \u003Cname> \u003Ctext...>          # Works in session\r\n```\r\n\r\n### New CLI Options\r\n```\r\n--save-session                  Whether to save the session\r\n```\r\n\r\n## Fix Bugs\r\n\r\n- erratic behaviour when using temp role in a session ([#347](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F347))\r\n- color on non-truecolor terminal ([#363](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F363))\r\n- not dirty session when updating properties ([#379](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F379))\r\n- incorrectly render text contains tabs ([#384](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F384))\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.14.0...v0.15.0","2024-04-07T14:12:30",{"id":251,"version":252,"summary_zh":253,"released_at":254},81827,"v0.14.0","## Breaking Changes\r\n\r\n### Compress session automaticlly ([#333](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F333))\r\n\r\nWhen the total number of tokens in the session messages exceeds `compress_threshold`, aichat will automatically compress the session.\r\n\r\n**This means you can chat forever in the session**.\r\n\r\nThe default `compress_threshold` is 2000, set this value to zero to disable automatic compression.\r\n\r\n### Rename `max_tokens` to `max_input_tokens` ([#339](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F339))\r\n\r\nTo avoid misunderstandings. The `max_input_tokens` also be referred to as `context_window`.\r\n\r\n```diff\r\n    models:\r\n      - name: mistral\r\n--      max_tokens: 8192\r\n++      max_input_tokens: 8192\r\n```\r\n## New Models\r\n\r\n- claude\r\n  - claude:claude-3-opus-20240229\r\n  - claude:claude-3-sonnet-20240229\r\n  - claude:claude-2.1\r\n  - claude:claude-2.0\r\n  - claude:claude-instant-1.2\r\n  \r\n- mistral\r\n  - mistral:mistral-small-latest\r\n  - mistral:mistral-medium-latest\r\n  - mistral:mistral-larget-latest\r\n  - mistral:open-mistral-7b\r\n  - mistral:open-mixtral-8x7b\r\n\r\n- ernie\r\n  - ernie:ernie-3.5-4k-0205\r\n  - ernie:ernie-3.5-8k-0205\r\n  - ernie:ernie-speed\r\n\r\n## Commmand Changes\r\n\r\n- `-c\u002F--code` generate code only  ([#327](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F327))\r\n\r\n## Chat-REPL Changes\r\n\r\n- `.clear messages` to clear session messages ([#332](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F327))\r\n\r\n## Miscellences\r\n\r\n- shell integrations ([#323](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F323))\r\n- allow overriding execute\u002Fcode role ([#331](https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F331))\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.13.0...v0.14.0","2024-03-07T15:34:41",{"id":256,"version":257,"summary_zh":258,"released_at":259},81828,"v0.13.0","## What's Changed\r\n* fix: copy on linux wayland by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F288\r\n* fix: deprecation warning of .read command by @Nicoretti in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F296\r\n* feat: supports model capabilities by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F297\r\n* feat: add openai.api_base config by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F302\r\n* feat: add `extra_fields` to models of localai\u002Follama clients by @kelvie in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F298\r\n* fix: do not attempt to deserialize zero byte chunks in ollama stream by @JosephGoulden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F303\r\n* feat: update openai\u002Fqianwen\u002Fgemini models by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F306\r\n* feat: support vertexai by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F308\r\n* refactor: update vertexai\u002Fgemini\u002Fernie clients by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F309\r\n* feat: edit current prompt on $VISUAL\u002F$EDITOR by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F314\r\n* refactor: change header of messages saved to markdown by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F317\r\n* feat: support `-e\u002F--execute` to execute shell command by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F318\r\n* refactor: improve prompt error handling by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F319\r\n* refactor: improve saving messages by @sigoden in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F322\r\n\r\n## New Contributors\r\n* @Nicoretti made their first contribution in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F296\r\n* @kelvie made their first contribution in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F298\r\n* @JosephGoulden made their first contribution in https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F303\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.12.0...v0.13.0","2024-02-25T12:34:36",{"id":261,"version":262,"summary_zh":263,"released_at":264},81829,"v0.12.0","## What's Changed\r\n* feat: change REPL indicators https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F263\r\n* fix: pipe failed on macos https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F264\r\n* fix: cannot read image with uppercase ext https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F270\r\n* feat: support gemini https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F273\r\n* feat: abandon PaLM2 https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F274\r\n* feat: support qianwen:qwen-vl-plus https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F275\r\n* feat: support ollama https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F276\r\n* feat: qianwen vision models support embeded images https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F277\r\n* refactor: remove path existence indicator from info https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F282\r\n* feat: custom REPL prompt https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fpull\u002F283\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fsigoden\u002Faichat\u002Fcompare\u002Fv0.11.0...v0.12.0","2023-12-26T00:39:22"]