当前位置:   article > 正文

Langchain-Chatchat项目:1-整体介绍_chatchat embedding

chatchat embedding

基于Langchain与ChatGLM等语言模型的本地知识库问答应用实现。项目中默认LLM模型改为THUDM/chatglm2-6b[2],默认Embedding模型改为moka-ai/m3e-base[3]。

2.支持LLM模型  本地LLM模型接入基于FastChat实现,支持模型如下:

说明:在线LLM模型目前已支持:ChatGPT、智谱AI、MiniMax、讯飞星火和百度千帆。

3.支持Embedding模型  本项目支持调用HuggingFace中的Embedding模型:

4.安装FastChat

二.设置配置项1.LLM模型配置  配置Langchain-Chatchat/configs/model_config.py文件中的llm_model_dict参数:

2.Embedding模型配置  配置Langchain-Chatchat/configs/model_config.py文件中的embedding_model_dict参数:

3.知识库初始化与迁移  首次运行项目,需要初始化或重建知识库,如下所示:

三.启动API服务和Web UI  一键启动所有Fastchat服务、API服务、WebUI服务:1.启动命令

2.FastAPI docs界面

图片

图片

3.Web UI对话界面

图片

图片

4.Web UI知识库管理页面

图片

图片

参考文献:[1]Langchain-Chatchat:https://github.com/chatchat-space/Langchain-Chatchat[2]https://huggingface.co/THUDM/chatglm2-6b[3]https://huggingface.co/moka-ai/m3e-base[4]https://github.com/lm-sys/FastChat[5]https://github.com/chatchat-space/Langchain-Chatchat/issues

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/821622
推荐阅读
相关标签
  

闽ICP备14008679号