Ifyoudonothaveadedicatedserver,IhighlyrecommendusingPythonAnywhere,AWSorHerokutohostyourapplication.
DeployingonHerokuIfyouaredeployingonHeroku,youwillhavetochangethedatabaseadapterfromchatterbot.storage.SQLStorageAdaptertochatterbot.storage.MongoDatabaseAdaptersinceSQLite3isn'tsupported.Todothissimplychangethefollowingline:
english_bot=ChatBot("EnglishBot",storage_adapter="chatterbot.storage.SQLStorageAdapter")
...tousetheMongoDBadapter:
english_bot=ChatBot("EnglishBot",storage_adapter="chatterbot.storage.MongoDatabaseAdapter",database=mongodb_name,database_uri=mongodb_uri)...wheremongodb_nameisthenameofthedatabaseyouwishtoconnecttoandmongodb_uriistheURIofaremoteinstanceofMongoDB.
LicenseThissourceisfreetouse,butChatterBotdoeshavealicensewhichstillappliesandcanbefoundontheLICENSEpage.
评论