在之前文章(https://blog.csdn.net/cui841923894/article/details/82156080)创建了图灵机器人,现在Python调用API实现linux上自动回复脚本。
1.代码test.py(参考博客https://blog.csdn.net/weixin_40127725/article/details/78185193的代码):
# -*- coding=utf-8 -*-
import requests
import random
import sys,os
KEY = 'ab0609e123456a28e1237e700f1' # 创建图灵机器人的apikey
def get_response(msg):
apiUrl = 'http: