update
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
```
|
||||
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)
|
||||
```
|
||||
@@ -46,8 +46,4 @@ python示例文档
|
||||
|
||||
[短信 Python SDK-SDK 文档-文档中心-腾讯云](https://cloud.tencent.com/document/product/382/43196)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
需要根据返回的id,轮询更新结果
|
||||
|
||||
Reference in New Issue
Block a user