首页 > 其他分享 >人工智能聊天DEMO

人工智能聊天DEMO

时间:2022-12-23 09:34:34浏览次数:41  
标签:人工智能 DEMO urllib parse msg api 聊天 qingyunke

import urllib.parse
import requests


#调用机器人接口
def qingyunke(msg):

	url = "http://api.qingyunke.com/api.php?key=free&appid=0&msg=%s" % (urllib.parse.quote(msg))

	html = requests.get(url)

	return html.json()["content"]

msg = "翻译i love you"

print(msg)

print(qingyunke(msg))

标签:人工智能,DEMO,urllib,parse,msg,api,聊天,qingyunke
From: https://www.cnblogs.com/djl-0628/p/17000006.html

相关文章