chatchat-space / Langchain-Chatchat

Langchain-Chatchat(原Langchain-ChatGLM)基于 Langchain 与 ChatGLM, Qwen 与 Llama 等语言模型的 RAG 与 Agent 应用 | Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain
Apache License 2.0
31.83k stars 5.55k forks source link

在线 Embeddings如何设置? #2174

Closed vincil77 closed 11 months ago

vincil77 commented 11 months ago

1.在线 Embeddings,zhipu的在线 Embeddings如何设置? 2.采用最轻模式本地部署方案,如果只设置了LLM(比如智谱的key),也能成功启动,这时Embeddings使用的是哪个模型及如何工作的?

pepperdog999 commented 11 months ago

碰到同样的问题,题主解决了么?

liunux4odoo commented 11 months ago

使用"zhipu-api"作为embedding_model即可,注意token消耗

vincil77 commented 11 months ago

解决了,不需要单独设置,新建知识库的时候,使用"zhipu-api"作为embedding_model即可,注意token消耗

在 2023-11-29 15:00:08,"Mula Liu" @.***> 写道:

碰到同样的问题,题主解决了么?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

huaka1 commented 11 months ago

请问题主,我也使用最轻模式本地部署方案,按照以下的配置: EMBEDDING_MODEL = "zhipu-api", "zhipu-api": { "api_key": "xxxxx", "version": "chatglm_turbo", # 可选包括 "chatglm_turbo" "provider": "ChatGLMWorker", },

但是报错如下:

File "/Users/huangaokai/code/python/Langchain-Chatchat/server/knowledge_base/kb_service/base.py", line 402, in embed_query query_embed = embeddings[0] TypeError: 'NoneType' object is not subscriptable 2023-12-05 14:43:11,688 - utils.py[line:188] - ERROR: RemoteProtocolError: API通信遇到错误:peer closed connection without sending complete message body (incomplete chunked read)

感觉是我的embedding使用有误,请问题主有遇到过这种问题吗?

chenwenfeng commented 11 months ago

同样 lite 跑遇到问题 不知道这个EMBEDDING_MODEL该怎么配置

lcdisme commented 10 months ago

请问题主,我也使用最轻模式本地部署方案,按照以下的配置: EMBEDDING_MODEL = "zhipu-api", "zhipu-api": { "api_key": "xxxxx", "version": "chatglm_turbo", # 可选包括 "chatglm_turbo" "provider": "ChatGLMWorker", },

但是报错如下:

File "/Users/huangaokai/code/python/Langchain-Chatchat/server/knowledge_base/kb_service/base.py", line 402, in embed_query query_embed = embeddings[0] TypeError: 'NoneType' object is not subscriptable 2023-12-05 14:43:11,688 - utils.py[line:188] - ERROR: RemoteProtocolError: API通信遇到错误:peer closed connection without sending complete message body (incomplete chunked read)

感觉是我的embedding使用有误,请问题主有遇到过这种问题吗?

同样的问题,感觉是embedding的时候,和zhipu-api网络交互有问题,post的返回值是400

vincil77 commented 9 months ago

配置文件只需要设置:LLM_MODELS = ["zhipu-api"]即可, EMBEDDING_MODEL 不用修改(我的是EMBEDDING_MODEL = "bge-large-zh",也可以用m3e-base,注意配置文件后面的路径) 使用的时候,在新建知识库界面,从下拉列表选择zhipu-api即可

在 2023-12-05 14:57:57,"chenwenfeng" @.***> 写道:

同样 lite 跑遇到问题 不知道这个EMBEDDING_MODEL该怎么配置

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

vincil77 commented 9 months ago

配置文件只需要设置:LLM_MODELS = ["zhipu-api"]即可, EMBEDDING_MODEL 不用修改(我的是EMBEDDING_MODEL = "bge-large-zh",也可以用m3e-base,注意配置文件后面的路径,如MODEL_PATH = { "embed_model": { "bge-large-zh": "Embedding/bge-large-zh", "m3e-base":"Embedding/m3e-base", },), 使用的时候,在新建知识库界面,从下拉列表选择zhipu-api即可,下图

在 2024-01-03 16:08:58,"lcd" @.***> 写道:

请问题主,我也使用最轻模式本地部署方案,按照以下的配置: EMBEDDING_MODEL = "zhipu-api", "zhipu-api": { "api_key": "xxxxx", "version": "chatglm_turbo", # 可选包括 "chatglm_turbo" "provider": "ChatGLMWorker", },

但是报错如下:

File "/Users/huangaokai/code/python/Langchain-Chatchat/server/knowledge_base/kb_service/base.py", line 402, in embed_query query_embed = embeddings[0] TypeError: 'NoneType' object is not subscriptable 2023-12-05 14:43:11,688 - utils.py[line:188] - ERROR: RemoteProtocolError: API通信遇到错误:peer closed connection without sending complete message body (incomplete chunked read)

感觉是我的embedding使用有误,请问题主有遇到过这种问题吗?

同样的问题,感觉是embedding的时候,和zhipu-api网络交互有问题,post的返回值是400

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

voidreaming commented 5 months ago

同问,使用线上 embedding API 的时候新建知识库显示找不到对应的知识库

image