from transformers import pipeline nlp = pipeline('text2text-generation',model ='THUDM/chatglm-6b',trust_remote_code=True) # response = nlp