• 大小: 8KB
    文件类型: .py
    金币: 1
    下载: 0 次
    发布日期: 2021-01-05
  • 语言: Python
  • 标签:

资源简介

电话机器人源码,欢迎添加微信: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()=

评论

共有 条评论

相关资源