flask-chatterbotAwebimplemetatioofChatterBotusigFlask.LocalSetup:EsurethatPytho,Flask,SQLAlchemy,adChatterBotareistalled(eithermaually,orrupipistall-rrequiremets.txt).Ruapp.pywithpythoapp.py.Thedemowillbeliveathttps://localhost:5000/HowdoIdeploythistoawebserver?
Ifyoudoothaveadedicatedserver,IhighlyrecommedusigPythoAywhere,AWSorHerokutohostyourapplicatio.
DeployigoHerokuIfyouaredeployigoHeroku,youwillhavetochagethedatabaseadapterfromchatterbot.storage.SQLStorageAdaptertochatterbot.storage.MogoDatabaseAdaptersiceSQLite3is'tsupported.Todothissimplychagethefollowiglie:
eglish_bot=ChatBot("EglishBot",storage_adapter="chatterbot.storage.SQLStorageAdapter")
...tousetheMogoDBadapter:
eglish_bot=ChatBot("EglishBot",storage_adapter="chatterbot.storage.MogoDatabaseAdapter",database=mogodb_ame,database_uri=mogodb_uri)...wheremogodb_ameistheameofthedatabaseyouwishtocoecttoadmogodb_uriistheURIofaremoteistaceofMogoDB.
LiceseThissourceisfreetouse,butChatterBotdoeshavealicesewhichstillappliesadcabefoudotheLICENSEpage.







评论