AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

[Bug]填了embedding的服务提供商却用不了

Open 8864g opened this issue 1 year ago • 6 comments

发生了什么

我照着这个附录 2:免费的嵌入模型申请弄,但是最后报错500了

Image

如何复现?

过程都和免费申请里面说的是一样的,检查服务提供商可用性的时候就出问题了

Image

AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

v3.5.22 通过 nohup 在 Ubuntu 服务器上直接运行 uv run main.py 派欧云 用napcat连接到QQ

操作系统

Linux

报错日志

[12:45:50] [Core] [WARN] [routes.config:262]: Provider with id '1_embedding' not found [12:45:50] [Core] [ERRO] [routes.config:262]: Critical error checking provider 1_embedding: Response.error() got an unexpected keyword argument 'status_code' [12:45:50] [Core] [ERRO] [routes.config:265]: Traceback (most recent call last): File "/root/AstrBot/astrbot/dashboard/routes/config.py", line 283, in check_one_provider_status return self._error_response(f"Provider with id '{provider_id}' not found", 404, logger.warning) File "/root/AstrBot/astrbot/dashboard/routes/config.py", line 266, in _error_response return Response().error(message, status_code=status_code).dict TypeError: Response.error() got an unexpected keyword argument 'status_code'

你愿意提交 PR 吗?

  • [x] 是的,我愿意提交 PR!

Code of Conduct

  • [x] 我已阅读并同意遵守该项目的 行为准则。

8864g avatar Jul 25 '25 04:07 8864g

我使用硅基流动提供的BAAI/bge-m3嵌入,也报500了。 在模型服务提供商的可用性检查处,该嵌入模型的状态为500。其他对话模型都正常。该模型配置的url、key和模型名都正确。对话中Alkaid调用嵌入搜索知识库的操作报错 [vector_store.astrbot_faiss_store:564]: 在集合 'kb1' 中搜索时发生错误: 获取向量失败,返回的向量为空或无效。请检查输入文本和配置。

3plus10i avatar Jul 25 '25 08:07 3plus10i

+1,使用openai的text-embedding-3-small也一样报错

WafuChtholly avatar Jul 29 '25 02:07 WafuChtholly

看了下应该和

#2113

一样,应该还没有发版到正式版?

WafuChtholly avatar Jul 29 '25 03:07 WafuChtholly

你這個情況我之前也撞過,主要其實不是單純的「embedding 服務提供者壞了」,而是整個 embedding → 儲存 → 查詢 的語意流程沒對齊。

這類錯誤我在自己整理的 AI 問題地圖裡標成「語意不等於 embedding」(Semantic ≠ Embedding),就是你覺得語意很對,但模型給的向量其實完全不對。尤其你這邊牽涉 API 換來換去,後端 index metadata 沒清乾淨的話,會進入一種部署後錯誤靜悄悄、前端還以為能查到東西的 bug 狀態。

我這邊有整理一整套對應方式,包含:

怎麼確保你目前查的向量真的來自正確語意的 embedding(而不是 cache 遺留)

怎麼檢查目前 vector DB 是否「已 ingest 但未 build index」

還有一堆發生在「還沒建好但你就查了」的錯誤型態(像你這 case)

有需要我可以幫你對照是哪一型錯誤。你的這個應該至少命中兩種,我猜還有 schema race condition 混進來。

onestardao avatar Aug 07 '25 15:08 onestardao

This issue has been automatically marked as stale because it has not had any activity. It will be closed in a certain period of time if no further activity occurs. If this issue is still relevant, please leave a comment.


该 Issue 已较长时间无活动, 已被标记为 stale。 如无后续活动, 将在一段时间后自动关闭。 如仍需跟进, 请回复评论。

github-actions[bot] avatar Jan 05 '26 08:01 github-actions[bot]

This issue has been automatically closed due to inactivity. If the problem still exists, feel free to reopen or create a new issue with updated information.


该 Issue 因长期无活动已自动关闭。 如问题仍存在, 欢迎补充复现信息并重新打开或新建 Issue。

github-actions[bot] avatar Feb 09 '26 08:02 github-actions[bot]