mirror of https://github.com/THUDM/ChatGLM-6B
Merge branch 'main' into dev
commit
1e40acce6a
|
@ -46,7 +46,7 @@ ChatGLM-6B 是一个开源的、支持中英双语的对话语言模型,基于
|
||||||
|
|
||||||
如果这些方法无法帮助你入睡,你可以考虑咨询医生或睡眠专家,寻求进一步的建议。
|
如果这些方法无法帮助你入睡,你可以考虑咨询医生或睡眠专家,寻求进一步的建议。
|
||||||
```
|
```
|
||||||
完整的模型实现可以在 [HuggingFace Hub](https://huggingface.co/THUDM/chatglm-6b) 上查看。
|
完整的模型实现可以在 [Hugging Face Hub](https://huggingface.co/THUDM/chatglm-6b) 上查看。
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,9 @@ MAX_TURNS = 20
|
||||||
MAX_BOXES = MAX_TURNS * 2
|
MAX_BOXES = MAX_TURNS * 2
|
||||||
|
|
||||||
|
|
||||||
def predict(input, history=[]):
|
def predict(input, history=None):
|
||||||
|
if history is None:
|
||||||
|
history = []
|
||||||
response, history = model.chat(tokenizer, input, history)
|
response, history = model.chat(tokenizer, input, history)
|
||||||
updates = []
|
updates = []
|
||||||
for query, response in history:
|
for query, response in history:
|
||||||
|
|
Loading…
Reference in New Issue