图灵机器人的使用
你要使用圖靈機器人的時候:你要進入圖靈網站:http://www.tuling123.com/
然后創(chuàng)建機器人:隨便選擇
這個可以隨便的創(chuàng)建:
然后進入api文檔
然后
import requests
import json
# import yuyin_test
tuling_url = "http://openapi.tuling123.com/openapi/api/v2"
data = {
"reqType":0,
"perception": {
"inputText": {
"text": "阜陽潁州區(qū)市醫(yī)院附近的高檔酒店"
}
},
"userInfo": {
"apiKey": "c9fd36f40d0f4adba06ba28f79c789a6",
"userId": "zilong"
}
}
res = requests.post(tuling_url,json = data) # 返回出去的信息
res_dict = json.loads(res.content.decode("utf8")) # type: dict
msg = res_dict.get("results")[0].get("values").get("text")
print(msg)
總結
- 上一篇: 18-行列式及其性质
- 下一篇: 数据标准化/归一化normalizati