ChatGLM-6B
ChatGLM-6B copied to clipboard
PoC with LangChain wrapper and a webapp to chat with vector store
新的webapp demo! 稍微功能复杂些的版本.
-
增加了一个实验版的ChatGLM LangChain wrapper. (用custom llm让ChatGLM能用在各类LangChain里)
-
增加了一个用Streamlit写的vectorstore based Chat. (搜索和选取wiki article作为context来chat)
- 用的数据是英文维基百科中, 所有与OpenAI wiki在两个链接之内的页面 (2 degree of separation)
- 数据储存在FAISS
- 整体偏proof of concept, 希望能作为一个有用的例子.
运行后如图
(提供两个模式, 正常聊天的 Chat 和 与wiki source聊天的 AI Wikipedia Agent)
- 增加了一个Chat with Books. (How to Avoid a Climate Disaster) 和与其对应的FAISS embeddings.
- 针对LangChain的 VectorDB Chat进行了些针对中文的Prompt优化.
虽然可以联网了,这很好,但是我要是有买openaiapikey的钱也不至于用chatglm还得int4
后续可不可以出在百度 or bing这种不要key的上面检索
@zx2021 langchain是可以用huggingface model作embedding的
好活! 移植其他embeddings参考:https://python.langchain.com/en/latest/reference/modules/embeddings.html
@zx2021 需要基于全开源模型的实现可以看一下这个 imClumsyPanda/langchain-ChatGLM 受这个 pull request 启发搞出来的
基于这个思路实现的平台:https://github.com/l15y/wenda 采用开源模型替代
可以不可以爬一下github或者gitee,充实模型的代码能力,作为代码辅助工具可以更强?