Merge pull request #18 from bobloy/chatter_fixes3

More logic stuff
readme_updates
bobloy 7 years ago committed by GitHub
commit 9473611e59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,6 +9,7 @@ from redbot.core.data_manager import cog_data_path
from chatter.chatterbot import ChatBot
from chatter.chatterbot.comparisons import levenshtein_distance
from chatter.chatterbot.response_selection import get_first_response
from chatter.chatterbot.trainers import ListTrainer
@ -32,7 +33,16 @@ class Chatter:
"ChatterBot",
storage_adapter='chatter.chatterbot.storage.SQLStorageAdapter',
database=str(data_path),
statement_comparison_function=levenshtein_distance
statement_comparison_function=levenshtein_distance,
response_selection_method=get_first_response,
logic_adapters=[
'chatter.chatterbot.logic.BestMatch',
{
'import_path': 'chatter.chatterbot.logic.LowConfidenceAdapter',
'threshold': 0.65,
'default_response': ':thinking:'
}
]
)
self.chatbot.set_trainer(ListTrainer)

Loading…
Cancel
Save