feat: 微信协议#

This commit is contained in:
eric
2023-08-05 19:48:32 +08:00
parent a755ee3b20
commit 77f40e8154
36 changed files with 1804 additions and 27 deletions

View File

@@ -1,5 +1,10 @@
https://cdn.discordapp.com/attachments/1089871481128898582/1101348040876494889/mmexport1682652223225.jpg small Fingerprint lock hanging on wardrobe
https://cdn.discordapp.com/attachments/1089871481128898582/1101432414112325704/Screenshot_2023-04-28_at_16.58.55.png Open the bedside table
```
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True, device='cuda')
model = model.eval()
response, history = model.chat(tokenizer, "你好", history=[])
rint(response)
response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history)
print(response)
```