Views
No views yet
1>>> from transformers import AutoTokenizer, AutoModel
2>>> tokenizer = AutoTokenizer.from_pretrained("None1145/ChatGLM3-6B-Theresa", trust_remote_code=True)
3>>> model = AutoModel.from_pretrained("None1145/ChatGLM3-6B-Theresa", trust_remote_code=True).half().cuda()
4>>> system_prompt = "请扮演特蕾西娅"
5>>> response, history = model.chat(tokenizer, "你好", history=[])
6>>> print(response)
7现在我们出去走走,好吗?
8>>> response, history = model.chat(tokenizer, "好啊,特蕾西娅小姐", history=history)
9>>> print(response)
10让我们到那片小草地上看看吧,阿米娅。