xiaoyuyu6420
xiaoyuyu6420
### Issue / 问题 Fixes #9295. When a quoted animated GIF is added to conversation history, it can be persisted as `data:image/gif;base64,...`. Some OpenAI-compatible Gemini gateways declare `image` modality support...
### 背景 知识库入库时,每个 chunk 的 embedding 文本都会拼接文档标题(`astrbot/core/knowledge_base/kb_helper.py` 约 396-400 行): ```python document_title = Path(file_name).stem.strip() embedding_contents = ( [f"{document_title}\n\n{chunk_text}" for chunk_text in chunks_text] if document_title else contents ) ``` 给 chunk...
**项目名**:RK87 AIKey **地址**:https://github.com/xiaoyuyu6420/rk87-aikey **语言**:JavaScript (Electron) **一句话**:不装官方 RK-AI 软件,让 RK R87 Pro AI 键盘的 14 个 AI 功能键和内置麦克风在 Windows / macOS 上完全可用。 **详细介绍**:通过逆向官方 Electron 明文源码 + 三轮实机 HID 抓包标定,完整还原键盘通信协议并开源成文档: - ⌨️...
## What happened / 发生了什么 Three dashboard tests are intermittently failing on `master` (different ones fail on different runs — classic flaky behavior): - `tests/test_dashboard.py::test_t2i_set_active_template_syncs_all_configs` - `tests/test_dashboard.py::test_t2i_reset_default_template_syncs_all_configs` - `tests/test_dashboard.py::test_t2i_update_active_template_reloads_all_schedulers` ###...
### 问题描述 `RecursiveCharacterChunker` 在块重叠(overlap)处理上会产出超过 `chunk_size` 上限的块。 `astrbot/core/knowledge_base/chunking/recursive.py`(约 108-123 行):当一个 split 会导致当前块超过 `chunk_size` 时,代码先 flush 当前块,然后取 `combined_text[-overlap:]` 作为 overlap_text,并直接构造 `current_chunk = [overlap_text, split]`、`current_chunk_length = len(overlap_text) + split_length`——**没有重新检查这个新累计长度是否已经超过 `chunk_size`**。因此下一个 flush 出来的块实际是 `chunk_size...
### 问题描述 KB 解析器路由(`select_parser`)与分块器(chunker)的格式白名单不一致,且部分常见格式完全无路由。 - `astrbot/core/knowledge_base/parsers/util.py` 的 `select_parser` 只支持:`.md/.txt/.markdown`(TextParser)、`.rst/.adoc/.xlsx/.docx/.xls`(MarkitdownParser)、`.epub`、`.pdf`,其余一律抛「暂时不支持的文件格式」 - `astrbot/core/knowledge_base/kb_helper.py`(约 336-337 行)的 Markdown 分块白名单还包含 `.mdx`、`.mkd`——这两个扩展名在 `select_parser` 中没有对应解析器,上传会在解析阶段直接失败,该分支实际是死代码,两侧自相矛盾 - `.html/.htm`、`.csv`、`.rtf` 完全没有路由,但 `MarkitdownParser`(markitdown-no-magika)本身能解析 html/rtf/csv,能力被浪费 另外,上传链路只依赖文件名末尾扩展名(`astrbot/dashboard/services/knowledge_base_service.py` 约 577-579 行),没有任何 magic bytes 内容嗅探;`astrbot/core/computer/file_read_utils.py`...
### 问题描述 KB 的 `TextParser` 解码序列不包含 UTF-16 / BOM 编码,Windows 记事本「另存为 → Unicode」(UTF-16 LE)保存的 txt 无法入库。 `astrbot/core/knowledge_base/parsers/text_parser.py`(约 31-39 行)解码尝试序列为 `["utf-8", "gbk", "gb2312", "gb18030"]`,缺失: - `utf-8-sig`(UTF-8 with BOM) - `utf-16` /...
### 问题描述 OpenAI 兼容 provider 的 token 用量统计在 `cached_tokens > prompt_tokens`(畸形或非 OpenAI 兼容的 usage 响应)时会出现负值。 `astrbot/core/provider/sources/openai_source.py`(约 737-738 行): ```python return TokenUsage( input_other=prompt_tokens - cached, ... ) ``` 对 `prompt_tokens -...