Replies: 2 comments 1 reply
-
问题 2 的解答可参考 #4979 (comment) , |
Beta Was this translation helpful? Give feedback.
1 reply
-
关于问题 1,我个人觉得 Langchain-Chatchat/libs/chatchat-server/chatchat/server/utils.py Lines 344 to 349 in fde5604 Langchain-Chatchat/libs/chatchat-server/chatchat/server/utils.py Lines 305 to 316 in fde5604 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
目标:使用厂商提供的 Embedding API 服务
遇到的问题:通过打印的 log 发现,chatchat 仍然使用的是本地 Embedding 模型 bge-large-zh-v1.5。
思考:
get_Embeddings()
。Langchain-Chatchat/libs/chatchat-server/chatchat/server/utils.py
Line 316 in fde5604
解决方法: 修改
get_Embeddings()
的逻辑,指定embed_model = get_default_embedding()
,而非embed_model = embed_model or get_default_embedding()
。修改后发现可以保证调用的是 model_setting.yaml 中指定的 Embedding,而非一开始伴随初始化传递的
embed_model
。尝试考察实参
embed_model
的来源:尽管很多函数的形参指定为
embed_model: str = get_default_embedding()
,但是往往他们接收到了初始化传递的实参embed_model
。继续查找有关
embed_model
的变量调用,通过 log 能够发现的最早的调用是来自FaissKBService(KBService)
这个类。接下来没有思路了。
期待得到的解答:
get_Embeddings()
和check_embed_model()
有相同的embed_model
更新逻辑embed_model = embed_model or get_default_embedding()
,是否重复?get_Embeddings()
中的embed_model = embed_model or get_default_embedding()
目的是什么,为什么导致我无法使用指定的 Embedding?embed_model
是在什么地方被初始化的?Beta Was this translation helpful? Give feedback.
All reactions