mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-19 10:22:04 +08:00
之前在 #6863 中我提交的修复使用了 rstrip() 来移除末尾的 /embeddings, 但 rstrip() 是字符集操作,会误删 URL 末尾属于该字符集的字符。 例如 siliconflow.cn 的末尾 n 会被误删,导致 URL 变成 siliconflow.c 改用 removesuffix() 可以正确处理这种情况,只在字符串以指定后缀结尾时才移除。 closes #7025