<commit_before>from logger import logger as log
import urllib.request, urllib.error, urllib.parse
import json
import os as os
dir_path = os.path.dirname(os.path.realpath(__file__))
dir_path = dir_path.replace("bot_response", "")
import sys as sys
from urllib.request import urlopen
from rif import reader as sr
from tts import tts
from bot_learn import bot_learn as bl
from rif import reader
from rif import writer
from storage import sql_base
from storage.sql_base import SQL

def get_name():
	return reader.getClarissaSetting("clarissa", "name")

cbot_name = get_name()
if(cbot_name is None):
	cbot_name = "Clarissa"
def set_name(bot_name):
	writer.setClarissaSetting("clarissa", "name", bot_name)
	#import bot as bot
	os.system("py -3 "+str("bot.py"))

def getResponse(messageToBot):
	import requests
	try:
		getServerBasedResponse(messageToBot)
	except urllib.error.HTTPError:
		getChatBasedResponse(messageToBot)
	except requests.exceptions.ConnectionError:
		getChatBasedResponse(messageToBot)<commit_msg>Update bot_response.py<commit_after>from logger import logger as log
import urllib.request, urllib.error, urllib.parse
import json
import os as os
dir_path = os.path.dirname(os.path.realpath(__file__))
dir_path = dir_path.replace("bot_response", "")
import sys as sys
from urllib.request import urlopen
from rif import reader as sr
from tts import tts
from bot_learn import bot_learn as bl
from rif import reader
from rif import writer
from storage import sql_base
from storage.sql_base import SQL

def get_name():
	return reader.getClarissaSetting("clarissa", "name")
cbot_name = ""
cbot_name = get_name()
if(cbot_name is None):
	cbot_name = "Clarissa"
def set_name(bot_name):
	writer.setClarissaSetting("clarissa", "name", bot_name)
	#import bot as bot
	os.system("py -3 "+str("bot.py"))

def getResponse(messageToBot):
	import requests
	try:
		getServerBasedResponse(messageToBot)
	except urllib.error.HTTPError:
		getChatBasedResponse(messageToBot)
	except requests.exceptions.ConnectionError:
		getChatBasedResponse(messageToBot)
{'fraction_non_alphanumeric': 0.08899755501222494, 'fraction_numerical': 0.0009779951100244498, 'mean_word_length': 6.333333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7192872', 'n_tokens_mistral': 680, 'n_tokens_neox': 674, 'n_words': 193}