ChatGLM-6B icon indicating copy to clipboard operation
ChatGLM-6B copied to clipboard

[BUG/Help] chatGLM是否可以联网/在搜索引擎获取最新消息

Open YIZXIY opened this issue 1 year ago • 7 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

我问了chatGLM,但是他的回答颠三倒四,一会谁可以一会说不行,想求证一下到底行不行

Expected Behavior

No response

Steps To Reproduce

.

Environment

- OS:windows10
- Python:3.10
- Transformers:
- PyTorch:2.0.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :ture

Anything else?

No response

YIZXIY avatar Mar 22 '23 14:03 YIZXIY

不行,但你可以把网页上的内容作为输入进行提问

georgechen1827 avatar Mar 23 '23 02:03 georgechen1827

可以配合Google custom search API加入到prompt里.

AlexZhangji avatar Mar 23 '23 06:03 AlexZhangji

可以利用llama-index和langchain实现对输入内容建立索引➡️输入问句匹配索引中内容➡️依据模版将匹配内容+问句形成新问句提出query➡️获得最终回答

imClumsyPanda avatar Mar 24 '23 02:03 imClumsyPanda

也许可以把搜索结果简单处理后插入到prompts前面

zerodegress avatar Mar 24 '23 05:03 zerodegress

可以配合Google custom search API加入到prompt里.

这个要怎么加

YIZXIY avatar Mar 24 '23 09:03 YIZXIY

这个要怎么加

YIZXIY avatar Mar 24 '23 09:03 YIZXIY

可以配合Google custom search API加入到prompt里.

这个要怎么加

你可以试试先抽取输入问题的关键词然后去搜索引擎搜一下然后把搜索到的内容喂给chatglm然后再让chatglm回答提的问题

66hh avatar Mar 25 '23 10:03 66hh

可以利用llama-index和langchain实现对输入内容建立索引➡️输入问句匹配索引中内容➡️依据模版将匹配内容+问句形成新问句提出query➡️获得最终回答 你好,这种实现方式有开源的项目可以参考吗

kunshou123 avatar Mar 27 '23 07:03 kunshou123

@kunshou123 可以看一下这个https://github.com/THUDM/ChatGLM-6B/pull/216

imClumsyPanda avatar Mar 27 '23 11:03 imClumsyPanda

我前两天刚做了一个基于本地文本的实现,后续可以通过langchain的接口增加html的接入,可以参考一下 langchain-ChatGLM

imClumsyPanda avatar Apr 01 '23 23:04 imClumsyPanda