response, history = model.chat(tokenizer, "你好", history=None)
print(response)
response, history = model.chat(tokenizer, "浙江的省会在哪里?", history=history)
print(response)
response, history = model.chat(tokenizer, "它有什么好玩的景点", history=history)
print(response)
复制代码
# 运行上面代码
python chat-7b.py
复制代码
运行的时候出了个错误
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory /home/taoxifa/.cache/modelscope/hub/qwen/Qwen-7B-Chat.