資源簡介
電話機器人源碼,歡迎添加微信:15011395541 進行交流。
通過系統的錄入增加話術,能夠通過與客戶的對話內容來判斷客戶的需求和意向,從而為客戶進行問題的解答。
代碼片段和文件信息
import?ESL
#!/usr/bin/python3
import?pymysql
import?time??
import?sys
import?logging?
import?os
import?urllib.parse
import?signal
con?=?ESL.ESLconnection(‘localhost‘?‘8021‘?‘ClueCon‘)
userid=?sys.argv[1]
threadnum=?sys.argv[2]
threadith=?sys.argv[3]
LOG_FORMAT?=?“%(asctime)s?-?%(levelname)s?-?%(message)s“
logname=“./log/“+str(userid)+“_“+str(threadith)+“/ac“+str(time.strftime(“%Y%m%d-%H%M%S“))
if?not?os.path.isdir(“./log/“+str(userid)+“_“+str(threadith)+“/“):
????os.makedirs(“./log/“+str(userid)+“_“+str(threadith)+“/“)
logging.basicConfig(filename=logname?level=logging.DEBUG?format=LOG_FORMAT)
starttime=‘‘
endtime=‘‘
callingid=‘‘
def?onsignal_int(signum?frame):??
????logging.debug(‘收到SIGINT信號‘)?
????if?con.disconnect():
????????logging.debug(‘condisconnected‘)?
????if?con.connected()=
評論
共有 條評論